Skip to content

fix(dav): pair changed iTip instances by UID/RECURRENCE-ID instead of… - #64635

Merged
SebastianKrupinski merged 1 commit into
masterfrom
fix/event-instance-paring
Oct 29, 2026
Merged

SebastianKrupinski merged 1 commit into
masterfrom
fix/event-instance-paring

Conversation

@SebastianKrupinski

@SebastianKrupinski SebastianKrupinski commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

… array position

Summary

  • Resolves: No e-mail notification sent when invitee is removed from event calendar#8953

  • schedule() picked the "changed" VEvent via array_pop() on two unpaired flat arrays returned by EventComparisonService::findModified(), which could silently drop or mis-pair instances, and gated CANCEL/REPLY delivery on a comparison those methods never needed in the first place.

  • Folded EventComparisonService into IMipService, matching old/new instances explicitly by UID + RECURRENCE-ID instead of array position

  • Make schedule() method-aware: CANCEL/REPLY (which only ever consume the new instance) skip the old/new comparison entirely, fixing messages that iTip flagged as significant - e.g. removing an attendee, or a REPLY that only changes PARTSTAT - being silently dropped because the comparison found nothing "changed"

  • Widen the REQUEST diff from 3 properties to the full set iTip's own significantChangeProperties tracks (RRULE/RDATE/EXDATE/STATUS plus SEQUENCE/LAST-MODIFIED and everything the email can show a diff for)

Checklist

AI (if applicable)

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

Comment thread apps/dav/lib/CalDAV/Schedule/IMipService.php
@Rikdekker

Copy link
Copy Markdown
Contributor

We tested this on a 35.0.2 instance (applied the apps/dav/lib + composer part; all hunks apply) with CalDAV-driven scenarios and all mail captured in Mailpit. Before → after:

  • Organizer adds an attendee to the whole series: no mail to anyone → the new attendee gets a mail ✅. Small thing: the subject is "Invitation updated", because the instance exists in the old object. For an attendee who wasn't on the event before, "Invitation" would be expected.
  • Organizer removes an attendee from the whole series: no mail → "Cancelled" ✅ (calendar#8953).
  • Organizer removes an attendee from a single occurrence: that attendee now gets a mail ✅.

One side effect worth knowing about, though the cause is not in this PR: in every scenario that creates a new override (an attendee declines one occurrence, or the organizer adds or removes someone on one occurrence), TipBroker::parseEventForOrganizer flags significantChange for all attendees. That happens because the attendee's instance-key count grows, and because significantChangeHash is computed over the whole object. Before this PR, the old findModified comparison happened to drop some of those mails; now they are sent. Example: attendee C, who is only on occurrence 3, receives "Invitation updated" when attendee A declines occurrence 4. I opened #65971 with a fix for that in TipBroker, deciding significance per attendee over the occurrences they attend. With both applied on 35.0.2, every scenario mails only the affected attendee. It might be good to land the two close together. I've requested backports of #65971 to stable34 and stable35; it would be great to have this PR in both as well.

AI disclosure: the testing was done with the help of Claude Code (Anthropic). I reviewed and verified the results myself.

… array position

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/event-instance-paring branch from d8c48f4 to 954ab16 Compare October 29, 2026 14:49
@kesselb
kesselb enabled stacked auto-merge October 29, 2026 14:50
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@SebastianKrupinski
SebastianKrupinski disabled stacked auto-merge October 29, 2026 16:09
@SebastianKrupinski
SebastianKrupinski merged commit e4f8956 into master Oct 29, 2026
193 of 202 checks passed
@SebastianKrupinski
SebastianKrupinski deleted the fix/event-instance-paring branch October 29, 2026 16:09
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Oct 29, 2026
@backportbot

backportbot Bot commented Oct 29, 2026

Copy link
Copy Markdown

The backport to stable33 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable33
git pull origin stable33

# Create the new backport branch
git checkout -b backport/64635/stable33

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 954ab169

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/64635/stable33

Error: Failed to check for changes with origin/stable33: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

backportbot Bot commented Oct 29, 2026

Copy link
Copy Markdown

The backport to stable34 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable34
git pull origin stable34

# Create the new backport branch
git checkout -b backport/64635/stable34

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 954ab169

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/64635/stable34

Error: Failed to check for changes with origin/stable34: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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

Labels

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

No e-mail notification sent when invitee is removed from event

5 participants