From 6fb32e767d143866618cc84a70d6f0ade096a9af Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 25 Aug 2025 21:48:17 +0000 Subject: [PATCH] Bug 31698: Report errors and failures back to request.tt Signed-off-by: Pedro Amorim --- .../prog/en/modules/reserve/request.tt | 56 ++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) 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 928d3eb3634..833b41d164c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -178,7 +178,59 @@ [% END %] [% END %] - + [% IF ( hold_move_successes ) %] +
+

Moved the following holds:

+
    + [% FOREACH hold IN hold_move_successes %] +
  • + + [% hold.hold_id | html %] + - Moved from [%- INCLUDE 'biblio-title.inc' biblio=hold.original_biblio link = 1 -%] to [%- INCLUDE 'biblio-title.inc' biblio=hold.target_biblio link = 1 -%] +
  • + [% END %] +
+
+ [% END %] + [% IF ( hold_move_failures ) %] +
+ One or more holds were not moved due to following errors: +
    + [% FOREACH fail IN hold_move_failures %] +
  • + + [% fail.hold_id | html %] + [% SWITCH fail.error %] + [% CASE 'cannotReserveFromOtherBranches' %] + Target item cannot be reserved from other branches + [% CASE 'ageRestricted' %] + The target record and/or items are age restricted + [% CASE 'alreadypossession' %] + Target item is already checked out to patron + [% CASE 'noReservesAllowed' %] + No holds are allowed on the target item(s) + [% CASE 'tooManyReservesToday' %] + Target item has too many holds placed on it today + [% CASE 'tooManyReserves' %] + Target item has too many holds placed on it + [% CASE 'notReservable' %] + Target item is not reservable + [% CASE 'cannotReserveFromOtherBranches' %] + Target item cannot be placed on reserve for this branch + [% CASE 'branchNotInHoldGroup' %] + Tagret item is not in the local hold group + [% CASE 'notforloan' %] + Target item is not for loan + [% CASE 'damaged' %] + Target item is damaged + [% CASE %] + Error: [% fail.error | html %] + [% END %] +
  • + [% END %] +
+
+ [% END %] [% IF ( failed_holds ) %]
One or more holds were not placed due to following errors: @@ -1418,6 +1470,7 @@ [% INCLUDE 'csrf-token.inc' %] +

Review holds to move

@@ -1464,6 +1517,7 @@ [% INCLUDE 'csrf-token.inc' %] +

Review holds to move

-- 2.39.5