Koha-clms/circ
Martin Renvoize f43201075a
Bug 23909: Add AllowHoldCheckoutOverride for staff circulation
Introduce a new AllowHoldCheckoutOverride system preference (default 1
to preserve existing behaviour) that lets libraries prevent staff from
overriding held-item blockers at the circulation desk.

When AllowHoldCheckoutOverride is set to 0, CanBookBeIssued still
returns the hold-related keys (RESERVED, RESERVE_WAITING, TRANSFERRED
and PROCESSING) in the confirmation hash, but circ/circulation.pl
promotes them to the impossible hash before rendering the template.
This means no override button appears, and checkout of the held item
is refused outright with a clear message explaining which patron the
hold is for.

Matching entries have been added to the IMPOSSIBLE block of the
circulation template so the blocked-checkout message is meaningful.

This sits alongside the existing Allow*Override family
(AllowTooManyOverride, AllowNotForLoanOverride, AllowHoldPolicyOverride
and AllowRenewalOnHoldOverride) and uses the same staff-only semantics.

Test plan:
1. Set AllowHoldCheckoutOverride=1 (default). Place a waiting hold
   for patron A on an item. At /cgi-bin/koha/circ/circulation.pl
   attempt to check the item out to patron B: a confirmation dialog
   appears with "Check out anyway" override buttons.
2. Set AllowHoldCheckoutOverride=0. Repeat: checkout is refused with
   a message stating the item has been waiting for patron A. No
   override button is offered.
3. Repeat with pending holds (reserves.found IS NULL), items in
   transit and items being processed: each is refused when the
   preference is 0 and offered as an overridable confirmation when
   the preference is 1.

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 11:04:20 -06:00
..
add_message.pl Bug 39781: Allow limiting of custom message notices by library 2026-03-24 15:38:08 +01:00
article-request-slip.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
article-requests.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
bookcount.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
branchoverdues.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
branchtransfers.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
checkout-notes.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
circulation-home.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
circulation.pl Bug 23909: Add AllowHoldCheckoutOverride for staff circulation 2026-05-01 11:04:20 -06:00
curbside_pickups.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
del_message.pl Bug 41904: "Use of uninitialized value..." warning in del_message.pl 2026-03-05 08:33:55 -07:00
hold-transfer-slip.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
on-site_checkouts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
overdue.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
pendingbookings.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
pendingreserves.pl Bug 40529: Behavior change: Main patch 2025-11-03 14:13:22 -07:00
renew.pl Bug 23415: Add debt override support to circulation checkout page 2026-03-22 23:27:26 +01:00
request-article.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reserveratios.pl Bug 21941: Fix GROUP BY in circ/reserveratios.pl 2026-04-09 08:27:25 -06:00
returns.pl Bug 41957: Show hold group information on 'Hold found' modal 2026-04-10 09:48:02 -06:00
set-library.pl Bug 41229: Fix desk and register session persistence on library change 2025-12-01 08:34:05 -07:00
transfer-slip.pl Bug 35267: Apply preferences to preview and mailing 2026-04-17 09:18:06 -06:00
transfers_to_send.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
transferstoreceive.pl Bug 41206: Add collection code to transfers to receive 2026-02-06 15:17:10 -07:00
view_holdsqueue.pl Bug 40335: Fix mistake in template params 2025-10-14 14:51:57 -06:00
waitingreserves.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00