Skip to content

fix(dav): keep a cancelled occurrence cancelled for attendees#60658

Open
ndo84bw wants to merge 1 commit into
nextcloud:masterfrom
ndo84bw:fix/dav-itip-keep-cancelled-occurrence-in-request
Open

fix(dav): keep a cancelled occurrence cancelled for attendees#60658
ndo84bw wants to merge 1 commit into
nextcloud:masterfrom
ndo84bw:fix/dav-itip-keep-cancelled-occurrence-in-request

Conversation

@ndo84bw
Copy link
Copy Markdown

@ndo84bw ndo84bw commented May 22, 2026

Summary

Follow-up to and complement of #50843. While testing that iTip broker rework I noticed that cancelling a single occurrence of a recurring event still does not behave correctly for attendees, so this small addition makes the two changes together fully resolve nextcloud/calendar#6655.

Background. nextcloud/calendar#6655 was reported because cancelling a single occurrence cancelled the whole series on the attendee's calendar. That over-cancellation is already fixed by #50843 - the reworked broker no longer turns a single-occurrence cancellation into a series-wide CANCEL. (#50843 is merged but, as far as I can tell, not yet released, which is probably why the issue still looks open.)

The remaining issue. With #50843's broker the cancelled occurrence no longer takes down the whole series, but it does not stay cancelled for attendees either: it reappears as a normal event. TipBroker::parseEventForOrganizer emits a per-instance CANCEL for the cancelled occurrence plus a REQUEST for the attendee's remaining instances, with the cancelled instance removed from the REQUEST. But Sabre\VObject\ITip\Broker::processMessageRequest replaces all components of the attendee's stored object with the ones from the message, so the master-only REQUEST (delivered right after the CANCEL) drops the STATUS:CANCELLED override the CANCEL had just added, and the recurrence regenerates the occurrence as a normal event.

Fix. Keep the cancelled instance in the REQUEST. Because processMessageRequest does a full component replace, the REQUEST has to carry the complete state of the attendee's object - including the cancelled override - otherwise it is dropped. The separate per-instance CANCEL is left in place.

Testing. Verified on a live instance (#50843's broker + this patch): cancelling a single occurrence leaves only that occurrence struck through on both the organizer's and the attendee's calendars; the rest of the series is untouched. Without the patch the occurrence reappeared as a normal event for the attendee. A unit test (testParseEventForOrganizerCreatedInstanceCancelled) was extended to assert the REQUEST includes the cancelled override.

Note. #50843 is on stable34/master only, so this targets master; a stable34 backport pairs with #50843, and on NC 33 the whole-series cancellation persists until #50843 + this change are backported to stable33.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

… it cancelled

When an organizer cancels a single occurrence of a recurring event, the broker
emits a per-instance CANCEL plus a REQUEST for the attendee's remaining
instances. The REQUEST omitted the cancelled instance, but processMessageRequest
replaces all components of the attendee's stored object, so it dropped the
CANCELLED override the CANCEL had just added and the occurrence reappeared as a
normal event on the attendee's calendar.

Keep the cancelled instance in the REQUEST so the override survives the component
replace and the occurrence stays cancelled for attendees.

Refs: nextcloud/calendar#6655

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Nico Donath <ndo84bw@gmx.de>
@ChristophWurst
Copy link
Copy Markdown
Member

Thanks for the contribution

Mind restoring the pull request template and filling it out? Thanks

@ndo84bw
Copy link
Copy Markdown
Author

ndo84bw commented May 22, 2026

Mind restoring the pull request template and filling it out? Thanks

🤦‍♂️ Restored and filled out the template, thanks!

@ChristophWurst ChristophWurst added bug 3. to review Waiting for reviews feature: dav feature: caldav Related to CalDAV internals labels May 22, 2026
@ChristophWurst ChristophWurst added this to the Nextcloud 35 milestone May 22, 2026
@SebastianKrupinski
Copy link
Copy Markdown
Contributor

Hi @ndo84bw

Thanks for the PR, I will test this when I have a min

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: caldav Related to CalDAV internals feature: dav

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recurrent Events: When the organizer changes the status of an occurrence to 'cancelled', the whole event becomes cancelled on the attendee's calendar

3 participants