Bug 16991: Add subtitle to holds to pull report
authorOwen Leonard <oleonard@myacpl.org>
Tue, 9 Aug 2016 14:14:02 +0000 (10:14 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 2 Nov 2016 10:58:10 +0000 (10:58 +0000)
This patch adds output of subtitle to the holds to pull report using
keyword to MARC mapping information.

To test, apply the patch and go to Circulation -> Holds to pull. The
list of holds to pull should display subtitles.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Subtitle added using keyword to MARC mapping with default framework.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
circ/pendingreserves.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt

index 932b035..e9cee0c 100755 (executable)
@@ -31,6 +31,7 @@ use C4::Context;
 use C4::Output;
 use CGI qw ( -utf8 );
 use C4::Auth;
+use Koha::Biblios;
 use C4::Debug;
 use Koha::DateUtils;
 use DateTime::Duration;
@@ -152,6 +153,10 @@ if ( $run_report ) {
     $sth->execute(@query_params);
 
     while ( my $data = $sth->fetchrow_hashref ) {
+        my $record = Koha::Biblios->find($data->{biblionumber});
+        if ($record){
+            $data->{subtitle} = [ $record->subtitles ];
+        }
         push(
             @reservedata,
             {
@@ -159,6 +164,7 @@ if ( $run_report ) {
                 priority        => $data->{priority},
                 name            => $data->{l_patron},
                 title           => $data->{title},
+                subtitle        => $data->{subtitle},
                 author          => $data->{author},
                 borrowernumber  => $data->{borrowernumber},
                 itemnum         => $data->{itemnumber},
index 7bb77c8..11c7a0f 100644 (file)
@@ -114,7 +114,7 @@ $(document).ready(function() {
             <td>
             <p>
                 [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
-                [% reserveloo.title |html %]</a></p>
+                [% reserveloo.title |html %] [% FOREACH s IN reserveloo.subtitle %] [% s %][% END %]</a></p>
                 [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %]
             </td>
         [% ELSE %]