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
…
RepeatingClosure.pm
…
RepeatingClosures.pm
…
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
…
WeeklyClosure.pm
…
WeeklyClosures.pm
…