Repository navigation
fix(dav): make reminder and recurrence handling robust - #67045
Merged
Merged
Conversation
Deleting a webcal subscription removed reminders by the subscription id, but calendar_reminders.calendar_id refers to calendars, so it removed the pending reminders of an unrelated calendar. Subscriptions never get reminders, so that cleanup is dropped, and the reminder index job no longer indexes subscription objects either. Due reminders were processed in one loop that only caught MaxInstancesExceededException. A reminder that failed in any other way aborted the run and stayed queued, so every later run stopped at it and no reminders were sent. Each reminder is now processed on its own; one that fails is logged and removed, like reminders of invalid events. Reminders of shared calendars went to sharees for private events as well. They now go to the owner only, matching how private events are shown to sharees. The last occurrence of a COUNT rule was found by stepping through every occurrence, and REPEAT alarms were expanded REPEAT times, both without an upper bound. A COUNT above Sabre's maxRecurrences is now treated like an endless rule, and REPEAT is only used together with DURATION, as RFC 5545 requires, capped at 100 additional reminders. Reminders already removed by a subscription deletion are not restored; they are recreated when the event is saved again. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
GVodyanov
requested review from
a team,
ChristophWurst,
SebastianKrupinski and
tcitworld
as code owners
November 26, 2026 13:28
GVodyanov
requested review from
come-nc and
provokateurin
and removed request for
a team
November 26, 2026 13:28
ChristophWurst
approved these changes
Nov 26, 2026
kesselb
approved these changes
Nov 26, 2026
Contributor
|
@GVodyanov backports? |
Contributor
Author
|
/backport to stable35 |
Contributor
Author
|
/backport to stable34 |
Contributor
Author
|
/backport to stable33 |
Contributor
Author
|
/backport to stable32 |
Contributor
Author
|
/backport to stable31 |
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
A few fixes to how reminders are stored, processed and computed.
SubscriptionListenerremoved reminders by the subscription id, butcalendar_reminders.calendar_idrefers tooc_calendars, so deleting a subscription removed the pending reminders of an unrelated calendar. Subscriptions never get reminders, so that cleanup is dropped.BuildReminderIndexBackgroundJobno longer indexes subscription objects either.ReminderService::processReminders()handled all due reminders in one loop that only caughtMaxInstancesExceededException. A reminder that failed in any other way aborted the run and stayed queued, so every later run stopped at it. Each reminder is now processed on its own; one that fails is logged and removed, like reminders of invalid events.CLASS:PRIVATEevents too. They now go to the owner only, matching how private events are shown to sharees.EventReaderRRule::concludes()stepped through every occurrence of aCOUNTrule, andgetRemindersForVAlarm()expandedREPEATwithout a bound. ACOUNTaboveSabre\VObject\Settings::$maxRecurrencesis now treated like an endless rule (lastoccurence=CalDavBackend::MAX_DATE).REPEATis only used together withDURATION, as RFC 5545 requires, and capped at 100 additional reminders.Behaviour changes
lastoccurenceand iMIP texts are concerned, like endless rules.REPEATwithoutDURATIONis ignored.TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)
Assisted by ClaudeCode:claude-opus-5-5