From 2fc681625f92b5080640af3ee8ede1ae1ae2e39f Mon Sep 17 00:00:00 2001
From: Aleisha Amohia
Date: Fri, 19 Dec 2025 02:43:11 +0000
Subject: [PATCH] Bug 16131: Show branch transfer error messages in separate
alert boxes
Currently error messages show in one alert box as bullet points. When
there is only one error shown, this looks a bit strange to have a list
with one item. This enhancement displays each error message as its own
alert box.
To test:
1. Check out a Centerville item to someone in Centerville. For example,
check out 39999000004175 to yourself.
2. Go to Circulation -> Transfers. Enter the barcode 39999000004175 and
transfer the item to Centerville.
3. Confirm two error messages are shown, with one blue box for each.
4. Go to Koha administration -> System preferences. Set
UseBranchTransferLimits to Enforce and BranchTransferLimitsType to
collection code.
5. Go to Koha administration -> Library transfer limits. Go to the REF
tab and uncheck the Allow transfer? box for FFL - Fairfield, then hit
Save
6. Go to Circulation -> Transfers. Enter the barcode 39999000004175 and
transfer the item to Fairfield.
7. Confirm the error message shows in a blue box with no bullet point.
8. Type something random in the item barcode box and click Transfer.
9. Confirm the error message shows in a blue box with no bullet point.
Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard
---
.../prog/en/modules/circ/branchtransfers.tt | 71 ++++++++++---------
1 file changed, 36 insertions(+), 35 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt
index 56dd9901695..c03e8ee439c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt
@@ -182,42 +182,43 @@
[% END %]
[% IF ( errmsgloop ) %]
-
+ [% END %]
+ [% IF ( errmsgloo.errnotallowed ) %]
+
+
Transfer is not allowed for:
+
+ [% IF ( Koha.Preference('BranchTransferLimitsType') == 'itemtype' ) %]
+ - Item type: [% ItemTypes.GetDescription( errmsgloo.code ) | html %]
+ [% ELSE %]
+ - Collection: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => errmsgloo.code ) | html %]
+ [% END %]
+ - Originating library: [% Branches.GetName( errmsgloo.fbr ) | html %]
+ - Destination library: [% Branches.GetName( errmsgloo.tbr ) | html %]
+
+
+ [% END %]
+ [% IF ( errmsgloo.errdesteqholding ) %]
+
+
Item is already at destination library.
+
+ [% END %]
+ [% IF ( errmsgloo.errwasreturned ) %]
+
-
+ and has been returned.
+
+ [% END %]
+ [% END # /FOREACH errmsgloo %]
[% END # /errmsgloop %]
--
2.39.5