From ab1b98af33e7896ef71ce08fb4b9c9bebbd9b80e Mon Sep 17 00:00:00 2001 From: Thibaud Guillot Date: Mon, 18 Mar 2024 15:58:20 +0100 Subject: [PATCH] Bug 36346 : Prevent moving to the next object on 'not_allowed' rule Test plan: 1) Enable AllowHoldPolicyOverride 2) Set a new circulation rule on "Default holds policy by item type": For example, an item type called "Comics" with Hold policy set on "No holds allowed" 3) Go to an item related to this item type and force a hold :) 4) Try to perform a check-in on this item, no pop up 5) Try to perform a check out for another patron, no pop up again 6) Apply this patch 7) Repeat step 4 and 4, normally now there is a pop up with hold information Sponsored by : BibLibre --- C4/Reserves.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index c95a3d7ad42..19ee5e57805 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -975,7 +975,6 @@ sub CheckReserves { $patron //= Koha::Patrons->find( $res->{borrowernumber} ); my $branch = Koha::Policy::Holds->holds_control_library( $item, $patron ); my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$item->effective_itemtype); - next if ($branchitemrule->{'holdallowed'} eq 'not_allowed'); next if (($branchitemrule->{'holdallowed'} eq 'from_home_library') && ($item->homebranch ne $patron->branchcode)); my $library = Koha::Libraries->find({branchcode=>$item->homebranch}); next if (($branchitemrule->{'holdallowed'} eq 'from_local_hold_group') && (!$library->validate_hold_sibling({branchcode => $patron->branchcode}) )); -- 2.30.2