Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(dav): Stop sending reminders for deleted calendar events - #59145

Closed
joshtrichards wants to merge 2 commits into
masterfrom
jtr/fix-caldav-deleted-reminders-exclude
Closed

joshtrichards wants to merge 2 commits into
masterfrom
jtr/fix-caldav-deleted-reminders-exclude

Conversation

@joshtrichards

Copy link
Copy Markdown
Member

Summary

Notifications were still being sent for calendar events that had been deleted (moved to the trashbin).

Changes

  • Bug fix: Added co.deleted_at IS NULL to the calendarobjects join condition so trashed objects are excluded from reminder processing
    • Reviewer note: this is the main change - involving lines 53-55 (mapping to former line 44).
  • Other:
    • Removed unnecessary GROUP BY
      • The query joins on primary keys with no aggregate functions, so duplicate rows are not possible
    • Added $stmt->free() to both query methods to release database cursors
    • Code cleanup:
      • Removed redundant docblocks
      • Fixed typos
      • Extracted column list for readability
      • Misc formatting

Only true changes: lines 53-55 (former line 43) and the dropping of the groupBy (former line 46).

TODO

  • ...

Checklist

AI (if applicable)

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

The getRemindersToProcess() query joined calendarobjects without filtering out soft-deleted (trashed) objects. This caused reminders to continue firing for events the user had already deleted, since deletion moves objects to the trashbin rather than removing them from the calendarobjects table.

Add a deleted_at IS NULL condition to the calendarobjects join so
trashed objects are excluded from reminder processing.

Additionally:
- Remove unnecessary GROUP BY (joins are on primary keys with no aggregate functions, so no duplicate rows are possible)
- Add $stmt->free() to release database cursors after fetching
- Clean up redundant docblocks and fix typos
- Extract column list for readability

Fixes: #53497

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added bug feature: caldav Related to CalDAV internals labels Mar 21, 2026
Signed-off-by: Josh <josh.t.richards@gmail.com>
@susnux susnux added the community pull requests from community label Jun 9, 2026
@susnux susnux added this to the Nextcloud 35 milestone Jun 9, 2026
@blizzz blizzz mentioned this pull request Aug 27, 2026
@susnux

susnux commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request as it has been in draft state without any activity for more than six months.
If you are still interested in this change, feel free to revive it and reopen it (or ask us to reopen it if you cannot).
Thank you for your contribution!

@susnux susnux closed this Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug community pull requests from community feature: caldav Related to CalDAV internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Notifications still sent for deleted event

3 participants