Repository navigation
fix(calendar): only offer calendars that support the attachment's components - #14015
Open
carlospintojunior wants to merge 1 commit into
Open
carlospintojunior wants to merge 1 commit into
carlospintojunior wants to merge 1 commit into
Conversation
carlospintojunior
requested review from
ChristophWurst,
GretaD and
kesselb
as code owners
November 2, 2026 16:07
3 tasks done
The supported component set of each calendar was hard-coded to VEVENT, so "Import into calendar" also offered task-only calendars such as the default "Tasks" calendar. Importing an invitation there always failed with the generic "Could not create event" error. Evaluate supported-calendar-component-set, treating a missing property as "all components" as defined by RFC 4791 section 5.2.3, and only offer calendars that accept every component type in the attachment. Converting an event into a task on import is intentionally not done: it would be a new feature, not a fix. Surfacing the actual reason of a failed import is handled separately. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: carlos <carlos@vulcanum.com.br>
carlospintojunior
force-pushed
the
fix/calendar-import-supported-components
branch
from
November 2, 2026 16:33
9f6e91d to
6364487
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When importing an
.icsattachment via Import into calendar, every writable calendar is offered — including task-only calendars such as the default Tasks calendar.getCalendarData()hard-codedcomponents: { vevent: true }(there was a comment noting the missing check), sosupported-calendar-component-setwas requested in the PROPFIND but never evaluated.Picking a VTODO-only calendar for an invitation that contains a VEVENT makes the server reject the PUT, and the user only sees the generic "Could not create event" toast, with no hint why.
Changes
DAVService.getSupportedComponents()readssupported-calendar-component-set(singlecompor a list). A missing property is treated as "all components", per RFC 4791 §5.2.3.getUserCalendars(requiredComponents = ['VEVENT'])only returns writable calendars that accept all requested components. Existing callers (EventModal,Itinerary) keep the VEVENT default, which is now actually enforced.getCalendarComponents(data)returns the component types (VEVENT / VJOURNAL / VTODO) contained in an iCalendar file.MessageAttachment: downloads the attachment before listing calendars and only offers the ones that can store its contents. If none qualifies, a hint is shown instead of an empty list. Errors while loading calendars are now caught (previously the spinner could stay forever).How to reproduce (before)
invite.ics, VEVENT) attached.After: only Personal is listed.
Notes
A follow-up could surface the actual server error (e.g. the event already existing in the calendar after accepting the invitation, which currently also ends in the same generic toast). Kept out of this PR to keep it small.
Checklist
src/tests/unit/service/DAVService.spec.js), fail without the fixeslintclean on changed files🤖 Generated with Claude Code