From 5ccc05438adfd874b594ea40c84b658f54968e83 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 6 May 2014 11:32:02 -0400 Subject: [PATCH] Bug 12197: enforce the maxreserves preference when staff members place hold requests This patch ensures that the global maxreserves preference is enforced when staff members place hold requests. For example: 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 give 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 forcefully place the hold Signed-off-by: Galen Charlton --- reserve/request.pl | 1 + 1 file changed, 1 insertion(+) 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.10.4