From 9d742b17f5754308463b01affef16ccb4411147a Mon Sep 17 00:00:00 2001 From: Thibaud Guillot Date: Wed, 14 May 2025 13:52:37 +0000 Subject: [PATCH] Bug 38412: Display warning on biblio level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When no element is available, with AllowHoldPolicyOverride, a triangle appears on each element to be forced, but if you choose “next item available” without having any item available, you won't see anything. I think there's a small correction to be made in request.pl because there's no incrementation of $num_override when the item is to be forced... So I added it and logic did the rest. Test plan: 1) Set circulations rules for specific category and/or itemtype (for example 0 hold allowed for staff on books). Set AllowHoldPolicyOverride on "Allow". 2) For testing go on biblio with books itemtype, and place a hold for a staff category patron 3) Normally you will see triangles on each item on specific section but you can force it. When you just select the next item available none triangle and none alert showing. 4) Apply this patch and restart_all 5) Refresh your browser page 6) Normally now there is a triangle into 'Place hold' submit button and an alert pops up after click on it. Sponsored by: BibLibre --- reserve/request.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/reserve/request.pl b/reserve/request.pl index 5908ab692b..a3653fcdd8 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -546,6 +546,7 @@ if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) if ( @pickup_locations || C4::Context->preference('AllowHoldPolicyOverride') ) { $num_items_available++; $item->{override} = 1; + $num_override++; my $default_pickup_location; -- 2.25.1