From 8f33efbc2941afe90d42d2e71d3b1bc93b339864 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 28 Aug 2019 11:51:18 +0000 Subject: [PATCH] Bug 19718: Show message if patron has existing holds on a title To test: 1 - Set a rule to allow multiple holds on a title 2 - Place a single hold in the opac for a patron 3 - Return to record and attempt place a second hold 4 - Note there is no message but that you must match the type placed before (item or record level) 5 - Don't place the hold 6 - Apply patch 7 - Attempt to place second hold again 8 - Note there is a message informing you of which level hold you may place 9 - Test with both item/record level holds and placing a single request or multiple requests Signed-off-by: Donna Bachowski Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 8 +++++++- opac/opac-reserve.pl | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 6932d49f90..30c63ed0d5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -158,9 +158,15 @@
[% FOREACH bibitemloo IN bibitemloop %] + [% IF ( bibitemloo.holdable ) %]
+ [% IF bibitemloo.forced_hold_level %] +
+ You already have at least one [% bibitemloo.forced_hold_level %] level hold on this title. + All further holds must be [% bibitemloo.forced_hold_level %] level. +
+ [% END %]

- [% IF ( bibitemloo.holdable ) %] diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 5b16a7b78e..2a11ad48e5 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -638,6 +638,7 @@ foreach my $biblioNum (@biblionumbers) { if ($forced_hold_level) { $biblioLoopIter{force_hold} = 1 if $forced_hold_level eq 'item'; $biblioLoopIter{itemholdable} = 0 if $forced_hold_level eq 'record'; + $biblioLoopIter{forced_hold_level} = $forced_hold_level; } -- 2.39.5