Commit Graph
1 Commits
Author SHA1 Message Date
Lauri Ojansivu a49e9d70aa Add a per-board iCal (.ics) export feed, answering #2836.
#808 added the in-app Calendar view; #2836 ("CalDAV or iCal Support") asked
specifically for calendar EXPORT/SYNC via iCal or CalDAV, which did not exist
- only a one-way .ics IMPORT (icsImport.js, #6323) was in the codebase, with
a comment pointing to a separate external project for export.

Adds a new GET /api/boards/:boardId/calendar.ics route (models/export.js)
that streams a subscribable, read-only iCalendar feed of a board's cards:
one VEVENT per Received / Start-End span / Due date, the same four dates the
Calendar view already draws. Public boards need no token; private boards
authenticate the same way every other export route does (?authToken=, or a
logged-in session), and reuse Exporter.canExport()/_scopedCardSelector() so
the feed honours the same board-visibility and swimlane/list scoping as the
JSON/CSV/PDF exports. The ICS text itself is built by a new pure, dependency-
free module, models/lib/icalExport.js (mirrors icsImport.js's style), so it
is unit-testable without Meteor and reusable elsewhere.

The board Export popup gets a new "iCal" group with one link, built through
the existing exportUrl()/EXPORT_FORMAT_GROUPS table so it carries the same
authToken/scope handling as every other export format.

Deliberately EXPORT only, one-way, read-only: full CalDAV is a stateful,
two-way sync PROTOCOL with its own server (PROPFIND/REPORT, ETags,
collections), which is a much larger feature than a dates feed. Every
calendar client that can "subscribe to a URL" - Google Calendar, Apple
Calendar, Thunderbird, Outlook - reads a plain .ics feed like this one
directly; CalDAV is not needed for that.

Thanks to xet7 !

Closes #2836,
2026-09-10 20:35:37 +03:00