From 413e0d5701b5fbbdcb6f70e60b6e69578129925a Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Mon, 22 Jul 2024 18:11:11 +0000 Subject: [PATCH] Bug 26866: Sort items table on additem by cn_cort This patch changes the data-order attribute for the item callnumber column to use the item's cn_sort instead of the callnumber value. Test plan: 1. Create a bib 2. Add three items with source of classification LLC call numbers: JC43 .G6 1890 JC330 .F74 2000 JC480 .R63 2006 4. On additem.pl sor the items table by 'Full call number' 5. Confirm the items are now ordered correctly by cn_sort 6. Confirm the other columns still sort correctly Signed-off-by: Roman Dolny Signed-off-by: Julian Maurice Signed-off-by: Martin Renvoize (cherry picked from commit 033e9abc302d14b8edf83051af5b8f07c4314a61) Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 9cc3367330..ef570de7c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -158,14 +158,16 @@ [% FOREACH header IN item_header_loop %] [% SET attribute = header.attribute %] [% SET can_mod = item.nomod ? "nomod" : "canmod" %] - [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %] - [% IF header.attribute == 'datelastseen' %] + [% IF attribute AND date_fields.grep('^' _ attribute _ '$').size %] + [% IF attribute == 'datelastseen' %] [% item.$attribute | $KohaDates with_hours => 1 %] [% ELSE %] [% item.$attribute | $KohaDates %] [% END %] [% ELSIF ( item.$attribute && ( attribute == 'price' || attribute == 'replacementprice' ) ) %] [% item.$attribute | $Price %] + [% ELSIF item.$attribute && attribute == 'itemcallnumber' %] + [% item.$attribute | html %] [% ELSE %] [% item.$attribute | html %] [% END %] -- 2.39.5