From df7a9d214561c1126a12993aa74f22487e1c6422 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 15 May 2013 11:52:57 +0200 Subject: [PATCH] Bug 10247 - Too many reserves due to syspref does not show warning On intranet, when placing a reserve : If borrower as reached the reserves quota, a warning should appear : Cannot place hold * Too Many Holds: TEST has too many holds. This works when quota defined in circulation rules is reached but not when quota specified in syspref maxreserves is reached, in case this quota is lower than the one defined is circulation rules. This is because template param maxreserves is set twice, this patch corrects this bug. Also moves warnings and messages conditionnal variable from perl to template because it cause the same bug as for maxreserves. Test plan : - Select a borrower and an item - Look at reserve quota for the borrower category, the item branch and the item type - Set maxreserves syspref with a quota lower than the circulation quota - Perform reserves for borrower to reach the quota - Try to perform one more reserve => You get the warning "too many holds" - Set maxreserves syspref with a quota higher than the circulation quota - Try to perform one more reserve => You get the warning "too many holds" Check you get a warning for alreadyreserved, none_available and alreadypossession cases. Check you get a message for expiry and diffbranch cases. --- .../prog/en/modules/reserve/request.tt | 8 +++--- reserve/request.pl | 27 +++++--------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 122b2d0..91bf2a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -198,7 +198,7 @@ function checkMultiHold() { [% ELSE %] -[% IF ( warnings ) %] +[% IF ( maxreserves || alreadyreserved || none_available || alreadypossession ) %]
[% UNLESS ( multi_hold ) %] @@ -224,13 +224,13 @@ function checkMultiHold() {
[% END %] -[% IF ( messages ) %] -