From 8d1494ba5c84cab6361f355b1c84c4ac1456a697 Mon Sep 17 00:00:00 2001 From: Petro Vashchuk Date: Wed, 10 Jun 2020 15:36:01 +0300 Subject: [PATCH] Bug 25699: Add edition information to "Holds to pull" report Added a feature that displays edition information of the book together with title in "Holds to pull" report. Edition information is fetched from "biblioitem" table as "editionstatement" and transferred to template. Those changes don't have performance impact as all tables including "biblioitem" were already used and joined in this request. Mentored-by: Andrew Nugged Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit 2e14a0a3fa317191bf0ee735988a83b8f59d4ed5) Signed-off-by: Lucas Gass --- circ/pendingreserves.pl | 52 ++++++++++--------- .../prog/en/modules/circ/pendingreserves.tt | 1 + 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 7f2062942a..22c93f7130 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -206,6 +206,7 @@ my $strsth = biblio.part_number, biblio.part_name, biblio.author, + biblioitems.editionstatement, count(DISTINCT items.itemnumber) as icount, count(DISTINCT reserves.borrowernumber) as rcount, borrowers.firstname, @@ -246,31 +247,32 @@ $sth->execute(@query_params); while ( my $data = $sth->fetchrow_hashref ) { push( @reservedata, { - reservedate => $data->{l_reservedate}, - firstname => $data->{firstname} || '', - surname => $data->{surname}, - title => $data->{title}, - subtitle => $data->{subtitle}, - medium => $data->{medium}, - part_number => $data->{part_number}, - part_name => $data->{part_name}, - author => $data->{author}, - borrowernumber => $data->{borrowernumber}, - biblionumber => $data->{biblionumber}, - holdingbranches => [split('\|', $data->{l_holdingbranch})], - branch => $data->{l_branch}, - itemcallnumber => [split('\|', $data->{l_itemcallnumber})], - enumchron => [split('\|', $data->{l_enumchron})], - copyno => [split('\|', $data->{l_copynumber})], - count => $data->{icount}, - rcount => $data->{rcount}, - pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, - itemTypes => [split('\|', $data->{l_item_type})], - locations => [split('\|', $data->{l_location})], - reserve_id => $data->{reserve_id}, - holdingbranch => $data->{holdingbranch}, - homebranch => $data->{homebranch}, - itemnumber => $data->{itemnumber}, + reservedate => $data->{l_reservedate}, + firstname => $data->{firstname} || '', + surname => $data->{surname}, + title => $data->{title}, + editionstatement => $data->{editionstatement}, + subtitle => $data->{subtitle}, + medium => $data->{medium}, + part_number => $data->{part_number}, + part_name => $data->{part_name}, + author => $data->{author}, + borrowernumber => $data->{borrowernumber}, + biblionumber => $data->{biblionumber}, + holdingbranches => [split('\|', $data->{l_holdingbranch})], + branch => $data->{l_branch}, + itemcallnumber => [split('\|', $data->{l_itemcallnumber})], + enumchron => [split('\|', $data->{l_enumchron})], + copyno => [split('\|', $data->{l_copynumber})], + count => $data->{icount}, + rcount => $data->{rcount}, + pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, + itemTypes => [split('\|', $data->{l_item_type})], + locations => [split('\|', $data->{l_location})], + reserve_id => $data->{reserve_id}, + holdingbranch => $data->{holdingbranch}, + homebranch => $data->{homebranch}, + itemnumber => $data->{itemnumber}, } ); } 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 08193e0179..88decc7ad0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -80,6 +80,7 @@ [% INCLUDE 'biblio-title.inc' biblio=reserveloo %]

[% IF ( reserveloo.author ) %]

by [% reserveloo.author | html %]

[% END %] + [% IF ( reserveloo.editionstatement ) %]

[% reserveloo.editionstatement | html %]

[% END %] [% ELSE %] " -- 2.39.5