Koha-clms/Koha/Library/Calendar
Martin Renvoize 004fe4de21
Bug 42310: (QA follow-up) Reject in-place date changes on SingleClosure/Exception
store() only flushes the _holidays cache on insert, on the assumption that
updates only ever touch title/description. That assumption held for every
current caller (ModSingleholiday/ModExceptionholiday only ever change those
two fields), but nothing enforced it - a future caller updating date in
place would silently desync the cache for up to its TTL, with no error.

Make the assumption explicit: reject an update that changes date, rather
than silently allowing it. Callers that need to move a closure/exception to
a different date must delete and re-add.

Test plan:
1) prove t/db_dependent/Koha/Library/Calendar.t t/db_dependent/Calendar.t
   t/db_dependent/Holidays.t t/db_dependent/HoldsQueue.t

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-15 16:14:08 +00:00
..
Exception.pm Bug 42310: (QA follow-up) Reject in-place date changes on SingleClosure/Exception 2026-09-15 16:14:08 +00:00
Exceptions.pm Bug 42310: (follow-up) Move Koha::Calendar tree under Koha::Library::Calendar 2026-09-15 16:14:02 +00:00
RepeatingClosure.pm Bug 42310: (follow-up) Move Koha::Calendar tree under Koha::Library::Calendar 2026-09-15 16:14:02 +00:00
RepeatingClosures.pm Bug 42310: (follow-up) Move Koha::Calendar tree under Koha::Library::Calendar 2026-09-15 16:14:02 +00:00
SingleClosure.pm Bug 42310: (QA follow-up) Reject in-place date changes on SingleClosure/Exception 2026-09-15 16:14:08 +00:00
SingleClosures.pm Bug 42310: (follow-up) Move Koha::Calendar tree under Koha::Library::Calendar 2026-09-15 16:14:02 +00:00
WeeklyClosure.pm Bug 42310: (QA follow-up) Restore weekday validation on weekly closures 2026-09-15 16:14:06 +00:00
WeeklyClosures.pm Bug 42310: (follow-up) Move Koha::Calendar tree under Koha::Library::Calendar 2026-09-15 16:14:02 +00:00