Skip to content

Clean up OutOfOfficeEventDispatcherJob correctly - #66036

Open
MishowHD wants to merge 1 commit into
nextcloud:masterfrom
MishowHD:fix/dav/cleanup-ooo-jobs
Open

MishowHD wants to merge 1 commit into
nextcloud:masterfrom
MishowHD:fix/dav/cleanup-ooo-jobs

Conversation

@MishowHD

@MishowHD MishowHD commented Oct 30, 2026 •

Copy link
Copy Markdown

Summary

Fixes two cleanup issues in AbsenceService regarding OutOfOfficeEventDispatcherJob:

  1. clearAbsence() previously called $jobList->remove() without arguments, accidentally deleting pending jobs for all users on the instance. It now removes only the specific start and end jobs for the given absence ID.
  2. createOrUpdateAbsence() now removes existing jobs if the start or end date is moved to the past/present (<= now), preventing stray events from being fired at the previously scheduled time.
  3. Added and updated unit tests covering all cases in AbsenceServiceTest.

Checklist

AI (if applicable)

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

    Assisted-by: agy:gemini-3.8-flash

Signed-off-by: Giacomo Di Clerico <giacomodiclerico@gmail.com>
@MishowHD
MishowHD requested a review from a team as a code owner October 30, 2026 10:21
@MishowHD
MishowHD requested review from Altahrim, icewind1991, leftybournes and salmart-dev and removed request for a team October 30, 2026 10:21
@MishowHD MishowHD changed the title fix(dav): clean up OutOfOfficeEventDispatcherJob correctly Clean up OutOfOfficeEventDispatcherJob correctly Oct 30, 2026

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OutOfOfficeEventDispatcherJob is not cleaned up correctly

1 participant