Koha-clms/Koha/Library
Martin Renvoize 3ef756f5a0
Bug 42310: (QA follow-up) Refresh in-process closure state on add/delete_weekly_closure and add/delete_repeating_closure
add_weekly_closure/delete_weekly_closure and add_repeating_closure/
delete_repeating_closure returned $self without refreshing
$self->{weekly_closed_days}/{day_month_closed_days}, so a calendar object
would keep reporting the pre-change state to is_holiday (and everything
built on it - days_forward, next_open_days, etc.) until it was
re-instantiated. This is distinct from the _holidays Koha::Caches entry,
which single/exception closures already flush correctly on store/delete.

Call _init to rebuild both structures from the database after each
add/delete, so the same object reflects the change immediately.

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
   t/db_dependent/Holds/WaitingReserves.t t/db_dependent/Koha/CurbsidePickups.t
   t/db_dependent/Reserves/CancelExpiredReserves.t
   t/db_dependent/api/v1/libraries.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:09 +00:00
..
Calendar Bug 42310: (QA follow-up) Reject in-place date changes on SingleClosure/Exception 2026-09-15 16:14:08 +00:00
Calendar.pm Bug 42310: (QA follow-up) Refresh in-process closure state on add/delete_weekly_closure and add/delete_repeating_closure 2026-09-15 16:14:09 +00:00
FloatLimit.pm Bug 28530: Fix forbidden http pattern 2026-02-10 10:51:38 -07:00
FloatLimits.pm Bug 28530: (QA follow-up) Fix branch transfer limits not checking alternate libraries 2026-02-10 10:51:43 -07:00
Group.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Groups.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Hour.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Hours.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
OverDriveInfo.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
OverDriveInfos.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00