fix(dav): keep a cancelled occurrence cancelled for attendees#60658
Open
ndo84bw wants to merge 1 commit into
Open
fix(dav): keep a cancelled occurrence cancelled for attendees#60658ndo84bw wants to merge 1 commit into
ndo84bw wants to merge 1 commit into
Conversation
… 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>
Member
|
Thanks for the contribution Mind restoring the pull request template and filling it out? Thanks |
Author
🤦♂️ Restored and filled out the template, thanks! |
Contributor
|
Hi @ndo84bw Thanks for the PR, I will test this when I have a min |
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 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::parseEventForOrganizeremits a per-instanceCANCELfor the cancelled occurrence plus aREQUESTfor the attendee's remaining instances, with the cancelled instance removed from theREQUEST. ButSabre\VObject\ITip\Broker::processMessageRequestreplaces all components of the attendee's stored object with the ones from the message, so the master-onlyREQUEST(delivered right after theCANCEL) drops theSTATUS:CANCELLEDoverride theCANCELhad just added, and the recurrence regenerates the occurrence as a normal event.Fix. Keep the cancelled instance in the
REQUEST. BecauseprocessMessageRequestdoes a full component replace, theREQUESThas to carry the complete state of the attendee's object - including the cancelled override - otherwise it is dropped. The separate per-instanceCANCELis 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 theREQUESTincludes the cancelled override.Note. #50843 is on
stable34/masteronly, so this targetsmaster; astable34backport pairs with #50843, and on NC 33 the whole-series cancellation persists until #50843 + this change are backported tostable33.Checklist
3. to review, feature component)stable32)AI (if applicable)