From 28fe2deeb7891f103096d080254260d21bfddbe5 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 6 May 2014 11:32:02 -0400 Subject: [PATCH] Bug 12197 - Exceeding the maxreserves preference does not prevent librarian from placing the hold Create 3 items to place holds on. Set the circulation rule to allow 50 holds for all items. Set maxreserves to 2. Place a hold on 3 different items. On the third item, it will give a warning, but you can still place the hold. Despite what the circulation rule is set for (which is only a specific case rule), maxreserves is a global rule and should stop this from happening, not just giving a warning. Test Plan: 1) Reproduce the bug by following the steps above 2) Verify the bug exists 3) Apply this patch 4) Verify the librarian cannot place the hold now 5) Enable AllowHoldPolicyOverride 6) Verify the librarian can not forcefully place the hold --- reserve/request.pl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/reserve/request.pl b/reserve/request.pl index 1b303c7..b3beb92 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -406,6 +406,7 @@ foreach my $biblionumber (@biblionumbers) { if ( $policy_holdallowed + && !$maxreserves && !$item->{cantreserve} && IsAvailableForItemLevelRequest($itemnumber) && CanItemBeReserved( -- 1.7.2.5