From d35a7e753e29a840af8bb1173e285e01575830af Mon Sep 17 00:00:00 2001 From: Andrew Fuerste-Henry Date: Wed, 16 Sep 2020 11:18:49 +0000 Subject: [PATCH] Bug 23485: Show barcode in holds to pull Updated to only show one barcode number, with either an "only" or an "or any available" depending on whether it's an item or bib hold. Also incorporating feedback to simplify the TT logic and remove list formatting. To test: 1 - Place an item level hold on a bib with several items with the same callnumber 2 - View the holds to pull report 3 - Try to guess which one on the shelf is right? 4 - Apply patch 5 - See the barcode in holds to pull report 6 - You can now grab the correct item (but don't yet) 7 - Place a next available hold on the same title 8 - See the report now shows one possible valid barcode with the text "or any available." 9 - Check in a different item that fills the next available hold 10 - Now the report shows the single item for the borrower Signed-off-by: Michal Denar Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit fe84c3acba33af7a2fb27643f6b5f9129c329b36) Signed-off-by: Lucas Gass --- circ/pendingreserves.pl | 3 +++ .../intranet-tmpl/prog/en/modules/circ/pendingreserves.tt | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index d7b8c0a729..a689aa64da 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -199,6 +199,8 @@ my $strsth = ORDER BY items.itemnumber SEPARATOR '|') l_enumchron, GROUP_CONCAT(DISTINCT items.copynumber ORDER BY items.itemnumber SEPARATOR '|') l_copynumber, + GROUP_CONCAT(DISTINCT items.barcode + ORDER BY items.itemnumber SEPARATOR '|') l_barcode, biblio.title, biblio.subtitle, biblio.medium, @@ -263,6 +265,7 @@ while ( my $data = $sth->fetchrow_hashref ) { itemcallnumber => [split('\|', $data->{l_itemcallnumber})], enumchron => [split('\|', $data->{l_enumchron})], copyno => [split('\|', $data->{l_copynumber})], + barcode => [split('\|', $data->{l_barcode})], count => $data->{icount}, rcount => $data->{rcount}, pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 88decc7ad0..5546f46c4b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -57,6 +57,7 @@ First patron Title Libraries + Available barcodes Available call numbers Available copy numbers Available enumeration @@ -100,6 +101,11 @@ [% END %] + + [% IF ( reserveloo.barcode ) %] + [% IF ( reserveloo.itemnumber ) %]Only [% reserveloo.barcode.first | html %][% ELSE %][% reserveloo.barcode.first | html %] or any available.[% END %] + [% END %] + [% IF ( reserveloo.itemcallnumber ) %]
    -- 2.39.5