From 97b898d80fb596b48df2639dfe307cf04259095e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 4 May 2015 12:50:28 -0400 Subject: [PATCH] Bug 14142 - Holds queue viewer only displays first subtitle from marc keyword mappings Despite the point of the Keyword to MARC Mappings being to simplify the handling and display of repeated values from multiple subfields, the holds queue viewer will only display the first value found. What it should be doing instead is displaying all fields that match the subtitle keyword. Test Plan: 1) Apply this patch 2) Define multiple Keyword to MARC mappings for the subtitle keyword 3) Place a hold on a record using those subtitle fields 4) View the hold in the holds queue viewer 5) Note that all the subtitles now appear Signed-off-by:Heather Braum Signed-off-by: Jonathan Druart --- C4/HoldsQueue.pm | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 4e7f3e0..653b065 100755 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -137,7 +137,7 @@ sub GetHoldsQueueItems { while ( my $row = $sth->fetchrow_hashref ){ my $record = GetMarcBiblio($row->{biblionumber}); if ($record){ - $row->{subtitle} = GetRecordValue('subtitle',$record,'')->[0]->{subfield}; + $row->{subtitle} = [ map { $_->{subfield} } @{ GetRecordValue( 'subtitle', $record, '' ) } ]; $row->{parts} = GetRecordValue('parts',$record,'')->[0]->{subfield}; $row->{numbers} = GetRecordValue('numbers',$record,'')->[0]->{subfield}; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index 549a91a..e419bcd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -68,7 +68,7 @@ $(document).ready(function() { [% FOREACH itemsloo IN itemsloop %] -

[% itemsloo.title | html %] [% IF ( itemsloo.subtitle ) %][% itemsloo.subtitle %][% END %]

+

[% itemsloo.title | html %] [% FOREACH s IN itemsloo.subtitle %] [% s %][% END %]

[% itemsloo.biblionumber %]
[% itemsloo.author %]
-- 2.1.0