From 1039d11869dae9d0753ae897486cb81e9d5d26f2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 9 Feb 2021 16:01:59 +0100 Subject: [PATCH] Bug 27645: Prevent "is on hold" warning to be displayed twice During a batch checkout we display the "item is on hold" message depending on different conditions. However it can happen the message is displayed twice. If the checkout is not impossible then we see: This item is on hold for another patron. This item is on hold for another patron. The hold will be overridden, but not cancelled. We should only display the second one. Test plan: With a default ktd setup you can simply place an item on hold and use the batch checkout tool to check it out Signed-off-by: Lucas Gass Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart (cherry picked from commit 4bb20fdb30202018f1519c6bd336e33fa6732d9e) Signed-off-by: Fridolin Somers (cherry picked from commit 8113778f326570e7953b6485dc7298d829e3bc10) Signed-off-by: Andrew Fuerste-Henry --- .../en/modules/circ/circulation_batch_checkouts.tt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index 4df661a155..bc1512a2c4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -131,9 +131,6 @@ [% IF checkout_info.RESERVE_WAITING %]
  • This item is waiting for another patron.
  • [% END %] - [% IF checkout_info.RESERVED %] -
  • This item is on hold for another patron.
  • - [% END %] [% IF checkout_info.ISSUED_TO_ANOTHER %]
  • This item is checked out to another patron. [% IF CAN_user_circulate_force_checkout %] @@ -174,10 +171,10 @@ [% END %] - [% IF NOT checkout_info.IMPOSSIBLE && ( CAN_user_circulate_force_checkout or checkout_info.HIGHHOLDS ) %] - [% IF checkout_info.RESERVED || checkout_info.RESERVE_WAITING %] -
  • This item is on hold for another patron. The hold will be overridden, but not cancelled.
  • - [% END %] + [% IF NOT checkout_info.IMPOSSIBLE && ( CAN_user_circulate_force_checkout || checkout_info.HIGHHOLDS ) && ( checkout_info.RESERVED || checkout_info.RESERVE_WAITING ) %] +
  • This item is on hold for another patron. The hold will be overridden, but not cancelled.
  • + [% ELSIF checkout_info.RESERVED %] +
  • This item is on hold for another patron.
  • [% END %] [% IF checkout_info.PREVISSUE %] -- 2.39.5