Bug 25699: Add edition information to "Holds to pull" report
authorPetro Vashchuk <stalkernoid@gmail.com>
Wed, 10 Jun 2020 12:36:01 +0000 (15:36 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 24 Jun 2020 12:31:37 +0000 (14:31 +0200)
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 <nugged@gmail.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

circ/pendingreserves.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt

index 7f20629..22c93f7 100755 (executable)
@@ -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},
         }
     );
 }
index 08193e0..88decc7 100644 (file)
@@ -80,6 +80,7 @@
                     [% INCLUDE 'biblio-title.inc' biblio=reserveloo %]
                 </a></p>
                 [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %]
+                [% IF ( reserveloo.editionstatement ) %]<p>[% reserveloo.editionstatement | html %]</p>[% END %]
             </td>
         [% ELSE %]
             <td>"</td>