Repository navigation
fix(calendar): explain when an imported event already exists - #14016
Open
carlospintojunior wants to merge 2 commits into
Open
carlospintojunior wants to merge 2 commits into
carlospintojunior wants to merge 2 commits into
Conversation
carlospintojunior
requested review from
ChristophWurst,
GretaD and
kesselb
as code owners
November 2, 2026 16:14
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>
Importing an attachment whose event is already in the chosen calendar, typically because the invitation was accepted from Mail, is rejected by the server for its duplicate UID, but the user only saw the generic "Could not create event" error. After a failed import, look the attachment's UIDs up in the target calendar and say so if they are already there. The server's error text is intentionally not parsed: it is neither translated nor a stable API. Updating the existing event instead of failing is left out, as it needs a decision on how to handle SEQUENCE and local modifications. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: carlos <carlos@vulcanum.com.br>
carlospintojunior
force-pushed
the
fix/calendar-import-duplicate-error
branch
from
November 2, 2026 16:33
3263ad5 to
c2f6d3c
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
Follow-up to #14015. Importing an
.icsattachment whose event is already in the chosen calendar fails with the generic "Could not create event" toast, which gives the user no clue what went wrong.The most common way to get there: accept an invitation in Mail (the event is written to the calendar), then click Import into calendar on the same
invite.ics. The server rejects the duplicate UID, and the user is left wondering why.Changes
DAVService.getCalendarObjects(data)returns the{ component, uid }pairs of a file (one entry per UID, so recurrence exceptions are not counted twice).DAVService.calendarContainsObject(url, object)runs a CalDAVcalendar-query(REPORT,prop-filter UID/text-match) on the target calendar. The UID is XML-escaped.MessageAttachment.importCalendar()now receives the calendar (not only its URL). When the import fails, it checks whether the attachment's objects already exist in that calendar and shows "This event is already in the calendar {calendar}". Otherwise, or if that check fails as well, it falls back to the existing generic message.DAVService.spec.js) and a new component spec (MessageAttachment.vue.spec.js) covering success, duplicate, other failure and failing check.How to reproduce (before)
invite.icsattached and accept it in Mail.After: "This event is already in the calendar Personal".
Checklist
eslintclean on changed files🤖 Generated with Claude Code