View | Details | Raw Unified | Return to bug 11529
Collapse All | Expand All

(-)a/C4/Biblio.pm (-19 / +30 lines)
Lines 68-73 BEGIN { Link Here
68
        TransformHtmlToMarc
68
        TransformHtmlToMarc
69
        TransformHtmlToXml
69
        TransformHtmlToXml
70
        prepare_host_field
70
        prepare_host_field
71
        SplitSubtitle
71
    );
72
    );
72
73
73
    # Internal functions
74
    # Internal functions
Lines 635-673 sub _check_valid_auth_link { Link Here
635
636
636
=head2 GetRecordValue
637
=head2 GetRecordValue
637
638
638
  my $values = GetRecordValue($field, $record, $frameworkcode);
639
  my $values = GetRecordValue($field, $record);
639
640
640
Get MARC fields from a keyword defined in fieldmapping table.
641
Get MARC fields from the record using the framework mappings for biblio fields.
641
642
642
=cut
643
=cut
643
644
644
sub GetRecordValue {
645
sub GetRecordValue {
645
    my ( $field, $record, $frameworkcode ) = @_;
646
    my ( $field, $record ) = @_;
646
647
647
    if (!$record) {
648
    if (!$record) {
648
        carp 'GetRecordValue called with undefined record';
649
        carp 'GetRecordValue called with undefined record';
649
        return;
650
        return;
650
    }
651
    }
651
    my $dbh = C4::Context->dbh;
652
653
    my $sth = $dbh->prepare('SELECT fieldcode, subfieldcode FROM fieldmapping WHERE frameworkcode = ? AND field = ?');
654
    $sth->execute( $frameworkcode, $field );
655
656
    my @result = ();
657
658
    while ( my $row = $sth->fetchrow_hashref ) {
659
        foreach my $field ( $record->field( $row->{fieldcode} ) ) {
660
            if ( ( $row->{subfieldcode} ne "" && $field->subfield( $row->{subfieldcode} ) ) ) {
661
                foreach my $subfield ( $field->subfield( $row->{subfieldcode} ) ) {
662
                    push @result, { 'subfield' => $subfield };
663
                }
664
652
665
            } elsif ( $row->{subfieldcode} eq "" ) {
653
    my @result;
666
                push @result, { 'subfield' => $field->as_string() };
654
    my @mss = GetMarcSubfieldStructureFromKohaField("biblio.$field");
655
    foreach my $fldhash ( @mss ) {
656
        my $tag = $fldhash->{tagfield};
657
        my $sub = $fldhash->{tagsubfield};
658
        foreach my $fld ( $record->field($tag) ) {
659
            if( $sub eq '@' || $fld->is_control_field ) {
660
                push @result, $fld->data if $fld->data;
661
            } else {
662
                push @result, grep { $_ } $fld->subfield($sub);
667
            }
663
            }
668
        }
664
        }
669
    }
665
    }
670
671
    return \@result;
666
    return \@result;
672
}
667
}
673
668
Lines 3614-3619 sub RemoveAllNsb { Link Here
3614
    return $record;
3609
    return $record;
3615
}
3610
}
3616
3611
3612
=head2 SplitSubtitle
3613
3614
    $subtitles = SplitSubtitle($subtitle);
3615
3616
Splits a subtitle field to an array of hashes like the one GetRecordValue returns
3617
3618
=cut
3619
3620
sub SplitSubtitle {
3621
    my $subtitle = shift;
3622
3623
    my @subtitles = map( { 'subfield' => $_ }, split(/ \| /, $subtitle // '' ) );
3624
3625
    return \@subtitles;
3626
}
3627
3617
1;
3628
1;
3618
3629
3619
3630
(-)a/C4/HoldsQueue.pm (-8 / +9 lines)
Lines 132-138 sub GetHoldsQueueItems { Link Here
132
    my $dbh   = C4::Context->dbh;
132
    my $dbh   = C4::Context->dbh;
133
133
134
    my @bind_params = ();
134
    my @bind_params = ();
135
    my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, biblioitems.itemtype, items.location, items.enumchron, items.cn_sort, biblioitems.publishercode,biblio.copyrightdate,biblioitems.publicationyear,biblioitems.pages,biblioitems.size,biblioitems.publicationyear,biblioitems.isbn,items.copynumber
135
    my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, biblioitems.itemtype, items.location,
136
                         items.enumchron, items.cn_sort, biblioitems.publishercode,
137
                         biblio.copyrightdate, biblio.subtitle, biblio.part_number,
138
                         biblio.part_name,
139
                         biblioitems.publicationyear, biblioitems.pages, biblioitems.size, biblioitems.publicationyear,
140
                         biblioitems.isbn, items.copynumber
136
                  FROM tmp_holdsqueue
141
                  FROM tmp_holdsqueue
137
                       JOIN biblio      USING (biblionumber)
142
                       JOIN biblio      USING (biblionumber)
138
                  LEFT JOIN biblioitems USING (biblionumber)
143
                  LEFT JOIN biblioitems USING (biblionumber)
Lines 147-165 sub GetHoldsQueueItems { Link Here
147
    $sth->execute(@bind_params);
152
    $sth->execute(@bind_params);
148
    my $items = [];
153
    my $items = [];
149
    while ( my $row = $sth->fetchrow_hashref ){
154
    while ( my $row = $sth->fetchrow_hashref ){
150
        my $record = GetMarcBiblio({ biblionumber => $row->{biblionumber} });
151
        if ($record){
152
            $row->{subtitle} = [ map { $_->{subfield} } @{ GetRecordValue( 'subtitle', $record, '' ) } ];
153
            $row->{parts} = GetRecordValue('parts',$record,'')->[0]->{subfield};
154
            $row->{numbers} = GetRecordValue('numbers',$record,'')->[0]->{subfield};
155
        }
156
157
        # return the bib-level or item-level itype per syspref
155
        # return the bib-level or item-level itype per syspref
158
        if (!C4::Context->preference('item-level_itypes')) {
156
        if (!C4::Context->preference('item-level_itypes')) {
159
            $row->{itype} = $row->{itemtype};
157
            $row->{itype} = $row->{itemtype};
160
        }
158
        }
161
        delete $row->{itemtype};
159
        delete $row->{itemtype};
162
160
161
        my @subtitles = split(/ \| /, $row->{'subtitle'} // '' );
162
        $row->{'subtitle'} = \@subtitles;
163
163
        push @$items, $row;
164
        push @$items, $row;
164
    }
165
    }
165
    return $items;
166
    return $items;
(-)a/C4/Overdues.pm (+4 lines)
Lines 708-713 sub GetOverduesForBranch { Link Here
708
            borrowers.phone,
708
            borrowers.phone,
709
            borrowers.email,
709
            borrowers.email,
710
               biblio.title,
710
               biblio.title,
711
               biblio.subtitle,
712
               biblio.medium,
713
               biblio.part_number,
714
               biblio.part_name,
711
               biblio.author,
715
               biblio.author,
712
               biblio.biblionumber,
716
               biblio.biblionumber,
713
               issues.date_due,
717
               issues.date_due,
(-)a/C4/Search.pm (-1 / +1 lines)
Lines 1944-1950 sub searchResults { Link Here
1944
1944
1945
        SetUTF8Flag($marcrecord);
1945
        SetUTF8Flag($marcrecord);
1946
        my $oldbiblio = TransformMarcToKoha( $marcrecord, $fw );
1946
        my $oldbiblio = TransformMarcToKoha( $marcrecord, $fw );
1947
        $oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw);
1947
        $oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord);
1948
        $oldbiblio->{result_number} = $i + 1;
1948
        $oldbiblio->{result_number} = $i + 1;
1949
1949
1950
        # add imageurl to itemtype if there is one
1950
        # add imageurl to itemtype if there is one
(-)a/C4/ShelfBrowser.pm (-2 / +5 lines)
Lines 223-234 sub GetShelfInfo { Link Here
223
        my $this_biblio = GetBibData($item->{biblionumber});
223
        my $this_biblio = GetBibData($item->{biblionumber});
224
        next unless defined $this_biblio;
224
        next unless defined $this_biblio;
225
        $item->{'title'} = $this_biblio->{'title'};
225
        $item->{'title'} = $this_biblio->{'title'};
226
        $item->{'subtitle'} = C4::Biblio::SplitSubtitle($this_biblio->{'subtitle'}),
227
        $item->{'medium'} = $this_biblio->{'medium'};
228
        $item->{'part_number'} = $this_biblio->{'part_number'};
229
        $item->{'part_name'} = $this_biblio->{'part_name'};
226
        my $this_record = GetMarcBiblio({ biblionumber => $this_biblio->{'biblionumber'} });
230
        my $this_record = GetMarcBiblio({ biblionumber => $this_biblio->{'biblionumber'} });
227
        $item->{'browser_normalized_upc'} = GetNormalizedUPC($this_record,$marcflavour);
231
        $item->{'browser_normalized_upc'} = GetNormalizedUPC($this_record,$marcflavour);
228
        $item->{'browser_normalized_oclc'} = GetNormalizedOCLCNumber($this_record,$marcflavour);
232
        $item->{'browser_normalized_oclc'} = GetNormalizedOCLCNumber($this_record,$marcflavour);
229
        $item->{'browser_normalized_isbn'} = GetNormalizedISBN(undef,$this_record,$marcflavour);
233
        $item->{'browser_normalized_isbn'} = GetNormalizedISBN(undef,$this_record,$marcflavour);
230
        $item->{'browser_normalized_ean'} = GetNormalizedEAN($this_record,$marcflavour);
234
        $item->{'browser_normalized_ean'} = GetNormalizedEAN($this_record,$marcflavour);
231
        $item->{'subtitle'} = GetRecordValue('subtitle', $this_record, GetFrameworkCode( $item->{biblionumber} ));
232
        push @valid_items, $item;
235
        push @valid_items, $item;
233
    }
236
    }
234
    return @valid_items;
237
    return @valid_items;
Lines 239-245 sub GetBibData { Link Here
239
	my ($bibnum) = @_;
242
	my ($bibnum) = @_;
240
243
241
    my $dbh         = C4::Context->dbh;
244
    my $dbh         = C4::Context->dbh;
242
    my $sth = $dbh->prepare("SELECT biblionumber, title FROM biblio WHERE biblionumber=?");
245
    my $sth = $dbh->prepare("SELECT biblionumber, title, subtitle, medium, part_number, part_name FROM biblio WHERE biblionumber=?");
243
    $sth->execute($bibnum);
246
    $sth->execute($bibnum);
244
    my $bib = $sth->fetchrow_hashref();
247
    my $bib = $sth->fetchrow_hashref();
245
    return $bib;
248
    return $bib;
(-)a/Koha/Biblio.pm (-8 / +3 lines)
Lines 82-101 sub metadata { Link Here
82
82
83
my @subtitles = $biblio->subtitles();
83
my @subtitles = $biblio->subtitles();
84
84
85
Returns list of subtitles for a record.
85
Returns list of subtitles for a record according to the framework.
86
87
Keyword to MARC mapping for subtitle must be set for this method to return any possible values.
88
86
89
=cut
87
=cut
90
88
91
sub subtitles {
89
sub subtitles {
92
    my ( $self ) = @_;
90
    my ( $self ) = @_;
93
91
94
    return map { $_->{subfield} } @{
92
    my @subtitles = split( / \| /, $self->subtitle // '' );
95
        C4::Biblio::GetRecordValue(
93
    return @subtitles;
96
            'subtitle',
97
            C4::Biblio::GetMarcBiblio({ biblionumber => $self->id }),
98
            $self->frameworkcode ) };
99
}
94
}
100
95
101
=head3 can_article_request
96
=head3 can_article_request
(-)a/acqui/neworderbiblio.pl (-1 / +1 lines)
Lines 129-136 my @results; Link Here
129
foreach my $result ( @{$marcresults} ) {
129
foreach my $result ( @{$marcresults} ) {
130
    my $marcrecord = C4::Search::new_record_from_zebra( 'biblioserver', $result );
130
    my $marcrecord = C4::Search::new_record_from_zebra( 'biblioserver', $result );
131
    my $biblio = TransformMarcToKoha( $marcrecord, '' );
131
    my $biblio = TransformMarcToKoha( $marcrecord, '' );
132
    $biblio->{subtitles} = GetRecordValue( 'subtitle', GetMarcBiblio({ biblionumber => $biblio->{biblionumber} }),  GetFrameworkCode( $biblio->{biblionumber} ) );
133
132
133
    $biblio->{subtitles} = C4::Biblio::SplitSubtitle($biblio->{'subtitle'});
134
    $biblio->{booksellerid} = $booksellerid;
134
    $biblio->{booksellerid} = $booksellerid;
135
    push @results, $biblio;
135
    push @results, $biblio;
136
136
(-)a/basket/basket.pl (-3 / +1 lines)
Lines 59-70 if (C4::Context->preference('TagsEnabled')) { Link Here
59
foreach my $biblionumber ( @bibs ) {
59
foreach my $biblionumber ( @bibs ) {
60
    $template->param( biblionumber => $biblionumber );
60
    $template->param( biblionumber => $biblionumber );
61
61
62
    my $fw = GetFrameworkCode($biblionumber);
63
64
    my $dat              = &GetBiblioData($biblionumber);
62
    my $dat              = &GetBiblioData($biblionumber);
65
    next unless $dat;
63
    next unless $dat;
66
    my $record           = &GetMarcBiblio({ biblionumber => $biblionumber });
64
    my $record           = &GetMarcBiblio({ biblionumber => $biblionumber });
67
    $dat->{subtitle}     = GetRecordValue('subtitle', $record, $fw);
65
    $dat->{subtitle}     = GetRecordValue('subtitle', $record);
68
    my $marcnotesarray   = GetMarcNotes( $record, $marcflavour );
66
    my $marcnotesarray   = GetMarcNotes( $record, $marcflavour );
69
    my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
67
    my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
70
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
68
    my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
(-)a/catalogue/detail.pl (-1 / +1 lines)
Lines 141-147 my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); Link Here
141
my $marcseriesarray  = GetMarcSeries($record,$marcflavour);
141
my $marcseriesarray  = GetMarcSeries($record,$marcflavour);
142
my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
142
my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
143
my $marchostsarray  = GetMarcHosts($record,$marcflavour);
143
my $marchostsarray  = GetMarcHosts($record,$marcflavour);
144
my $subtitle         = GetRecordValue('subtitle', $record, $fw);
144
my $subtitle         = GetRecordValue('subtitle', $record);
145
145
146
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };
146
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } };
147
147
(-)a/catalogue/moredetail.pl (-1 / +1 lines)
Lines 110-116 if (@hostitems){ Link Here
110
        push (@items,@hostitems);
110
        push (@items,@hostitems);
111
}
111
}
112
112
113
my $subtitle = GetRecordValue('subtitle', $record, $fw);
113
my $subtitle = GetRecordValue('subtitle', $record);
114
114
115
my $totalcount=@all_items;
115
my $totalcount=@all_items;
116
my $showncount=@items;
116
my $showncount=@items;
(-)a/circ/branchoverdues.pl (-4 / +4 lines)
Lines 74-86 if ($tagslib->{$tag}->{$subfield}->{authorised_value}) { Link Here
74
# now display infos
74
# now display infos
75
foreach my $num (@getoverdues) {
75
foreach my $num (@getoverdues) {
76
    my %overdueforbranch;
76
    my %overdueforbranch;
77
    my $record = GetMarcBiblio({ biblionumber => $num->{biblionumber} });
78
    if ($record){
79
        $overdueforbranch{'subtitle'} = GetRecordValue('subtitle',$record,'')->[0]->{subfield};
80
    }
81
    my $dt = dt_from_string($num->{date_due}, 'sql');
77
    my $dt = dt_from_string($num->{date_due}, 'sql');
82
    $overdueforbranch{'date_due'}          = output_pref($dt);
78
    $overdueforbranch{'date_due'}          = output_pref($dt);
83
    $overdueforbranch{'title'}             = $num->{'title'};
79
    $overdueforbranch{'title'}             = $num->{'title'};
80
    $overdueforbranch{'subtitle'}          = $num->{'subtitle'};
81
    $overdueforbranch{'medium'}            = $num->{'medium'};
82
    $overdueforbranch{'part_number'}       = $num->{'part_number'};
83
    $overdueforbranch{'part_name'}         = $num->{'part_name'};
84
    $overdueforbranch{'description'}       = $num->{'description'};
84
    $overdueforbranch{'description'}       = $num->{'description'};
85
    $overdueforbranch{'barcode'}           = $num->{'barcode'};
85
    $overdueforbranch{'barcode'}           = $num->{'barcode'};
86
    $overdueforbranch{'biblionumber'}      = $num->{'biblionumber'};
86
    $overdueforbranch{'biblionumber'}      = $num->{'biblionumber'};
(-)a/circ/pendingreserves.pl (-5 / +8 lines)
Lines 198-203 my $strsth = Link Here
198
            GROUP_CONCAT(DISTINCT items.copynumber
198
            GROUP_CONCAT(DISTINCT items.copynumber
199
                    ORDER BY items.itemnumber SEPARATOR '<br/>') l_copynumber,
199
                    ORDER BY items.itemnumber SEPARATOR '<br/>') l_copynumber,
200
            biblio.title,
200
            biblio.title,
201
            biblio.subtitle,
202
            biblio.medium,
203
            biblio.part_number,
204
            biblio.part_name,
201
            biblio.author,
205
            biblio.author,
202
            count(DISTINCT items.itemnumber) as icount,
206
            count(DISTINCT items.itemnumber) as icount,
203
            count(DISTINCT reserves.borrowernumber) as rcount,
207
            count(DISTINCT reserves.borrowernumber) as rcount,
Lines 235-251 my $sth = $dbh->prepare($strsth); Link Here
235
$sth->execute(@query_params);
239
$sth->execute(@query_params);
236
240
237
while ( my $data = $sth->fetchrow_hashref ) {
241
while ( my $data = $sth->fetchrow_hashref ) {
238
    my $record = Koha::Biblios->find($data->{biblionumber});
239
    if ($record){
240
        $data->{subtitle} = [ $record->subtitles ];
241
    }
242
    push(
242
    push(
243
        @reservedata, {
243
        @reservedata, {
244
            reservedate     => $data->{l_reservedate},
244
            reservedate     => $data->{l_reservedate},
245
            firstname       => $data->{firstname} || '',
245
            firstname       => $data->{firstname} || '',
246
            surname         => $data->{surname},
246
            surname         => $data->{surname},
247
            title           => $data->{title},
247
            title           => $data->{title},
248
            subtitle        => $data->{subtitle},
248
            subtitle        => split(/ \| /, $data->{subtitle} // ''),
249
            medium          => $data->{medium},
250
            part_number     => $data->{part_number},
251
            part_name       => $data->{part_name},
249
            author          => $data->{author},
252
            author          => $data->{author},
250
            borrowernumber  => $data->{borrowernumber},
253
            borrowernumber  => $data->{borrowernumber},
251
            biblionumber    => $data->{biblionumber},
254
            biblionumber    => $data->{biblionumber},
(-)a/circ/reserveratios.pl (-4 / +5 lines)
Lines 27-33 use C4::Context; Link Here
27
use C4::Output;
27
use C4::Output;
28
use C4::Auth;
28
use C4::Auth;
29
use C4::Debug;
29
use C4::Debug;
30
use C4::Biblio qw/GetMarcBiblio GetRecordValue GetFrameworkCode/;
31
use C4::Acquisition qw/GetOrdersByBiblionumber/;
30
use C4::Acquisition qw/GetOrdersByBiblionumber/;
32
use Koha::DateUtils;
31
use Koha::DateUtils;
33
use Koha::Acquisition::Baskets;
32
use Koha::Acquisition::Baskets;
Lines 125-130 my $strsth = Link Here
125
124
126
        reserves.found,
125
        reserves.found,
127
        biblio.title,
126
        biblio.title,
127
        biblio.subtitle,
128
        biblio.medium,
129
        biblio.part_number,
130
        biblio.part_name,
128
        biblio.author,
131
        biblio.author,
129
        count(DISTINCT reserves.borrowernumber) as reservecount, 
132
        count(DISTINCT reserves.borrowernumber) as reservecount, 
130
        count(DISTINCT items.itemnumber) $include_aqorders_qty as itemcount
133
        count(DISTINCT items.itemnumber) $include_aqorders_qty as itemcount
Lines 154-161 while ( my $data = $sth->fetchrow_hashref ) { Link Here
154
    my $thisratio = $data->{reservecount} / $data->{itemcount};
157
    my $thisratio = $data->{reservecount} / $data->{itemcount};
155
    my $ratiocalc = ($thisratio / $ratio);
158
    my $ratiocalc = ($thisratio / $ratio);
156
    ($thisratio / $ratio) >= 1 or next;  # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause
159
    ($thisratio / $ratio) >= 1 or next;  # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause
157
    my $record = GetMarcBiblio({ biblionumber => $data->{biblionumber} });
158
    $data->{subtitle} = GetRecordValue('subtitle', $record, GetFrameworkCode($data->{biblionumber}));
159
    push(
160
    push(
160
        @reservedata,
161
        @reservedata,
161
        {
162
        {
Lines 163-169 while ( my $data = $sth->fetchrow_hashref ) { Link Here
163
            priority           => $data->{priority},
164
            priority           => $data->{priority},
164
            name               => $data->{borrower},
165
            name               => $data->{borrower},
165
            title              => $data->{title},
166
            title              => $data->{title},
166
            subtitle           => $data->{subtitle},
167
            subtitle           => C4::Biblio::SplitSubtitle($data->{'subtitle'});
167
            author             => $data->{author},
168
            author             => $data->{author},
168
            itemnum            => $data->{itemnumber},
169
            itemnum            => $data->{itemnumber},
169
            biblionumber       => $data->{biblionumber},
170
            biblionumber       => $data->{biblionumber},
(-)a/circ/transferstoreceive.pl (-3 / +4 lines)
Lines 99-104 while ( my $library = $libraries->next ) { Link Here
99
            %getransf = (
99
            %getransf = (
100
                %getransf,
100
                %getransf,
101
                title          => $biblio->title,
101
                title          => $biblio->title,
102
                subtitle       => C4::Biblio::SplitSubtitle($biblio->{'subtitle'}),
103
                medium         => $biblio->medium,
104
                part_number    => $biblio->part_number,
105
                part_name      => $biblio->part_name,
102
                author         => $biblio->author,
106
                author         => $biblio->author,
103
                biblionumber   => $biblio->biblionumber,
107
                biblionumber   => $biblio->biblionumber,
104
                itemnumber     => $item->itemnumber,
108
                itemnumber     => $item->itemnumber,
Lines 108-116 while ( my $library = $libraries->next ) { Link Here
108
                itemcallnumber => $item->itemcallnumber,
112
                itemcallnumber => $item->itemcallnumber,
109
            );
113
            );
110
114
111
            my $record = GetMarcBiblio({ biblionumber => $biblio->biblionumber });
112
            $getransf{'subtitle'} = GetRecordValue('subtitle', $record, $biblio->frameworkcode);
113
114
            # we check if we have a reserv for this transfer
115
            # we check if we have a reserv for this transfer
115
            my $holds = $item->current_holds;
116
            my $holds = $item->current_holds;
116
            if ( my $first_hold = $holds->next ) {
117
            if ( my $first_hold = $holds->next ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc (-1 / +1 lines)
Lines 20-26 Link Here
20
                <td><span title="[% reserveloo.waitingdate | html %]">[% reserveloo.waitingdate | $KohaDates %]</span></td>
20
                <td><span title="[% reserveloo.waitingdate | html %]">[% reserveloo.waitingdate | $KohaDates %]</span></td>
21
                <td><span title="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %]</span></td>
21
                <td><span title="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %]</span></td>
22
                <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
22
                <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
23
                    [% reserveloo.biblio.title | html %] [% FOREACH subtitl IN reserveloo.biblio.subtitles %] [% subtitl.subfield | html %][% END %]
23
                    [% reserveloo.biblio.title | html %] [% FOREACH subtitl IN reserveloo.biblio.subtitles %] [% subtitl | html %] [% reserveloo.biblio.part_number | html %] [% reserveloo.biblio.part_name | html %][% END %]
24
                    </a>
24
                    </a>
25
                        [% UNLESS ( item_level_itypes ) %]
25
                        [% UNLESS ( item_level_itypes ) %]
26
                            [% IF ( ItemTypes.GetDescription(reserveloo.item.effective_itemtype) ) %]&nbsp; (<b>[% ItemTypes.GetDescription(reserveloo.item.effective_itemtype) | html %]</b>)
26
                            [% IF ( ItemTypes.GetDescription(reserveloo.item.effective_itemtype) ) %]&nbsp; (<b>[% ItemTypes.GetDescription(reserveloo.item.effective_itemtype) | html %]</b>)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-1 / +1 lines)
Lines 77-83 Link Here
77
            <td>
77
            <td>
78
            <p>
78
            <p>
79
                [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
79
                [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
80
                [% reserveloo.title | html %] [% FOREACH s IN reserveloo.subtitle %] [% s | html %][% END %]</a></p>
80
                [% reserveloo.title | html %] [% FOREACH s IN reserveloo.subtitle %] [% s | html %][% END %] [% reserveloo.part_number | html %] [% reserveloo.part_name | html %]</a></p>
81
                [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %]
81
                [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %]
82
            </td>
82
            </td>
83
        [% ELSE %]
83
        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-1 / +5 lines)
Lines 123-129 Link Here
123
     <tbody>[% FOREACH itemsloo IN itemsloop %]
123
     <tbody>[% FOREACH itemsloo IN itemsloop %]
124
        <tr>
124
        <tr>
125
            <td class="hq-title">
125
            <td class="hq-title">
126
                <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber | uri %]"><strong>[% itemsloo.title | html %]</strong> [% FOREACH s IN itemsloo.subtitle %] [% s | html %][% END %]</a></p>
126
                <p>
127
                    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber | uri %]">
128
                        <strong>[% itemsloo.title | html %]</strong> [% FOREACH s IN itemsloo.subtitle %] [% s | html %][% END %] [% itemsloo.part_number | html %] [% itemsloo.part_name | html %]
129
                    </a>
130
                </p>
127
                <p>
131
                <p>
128
                    <div class="hq-biblionumber content_hidden">[% itemsloo.biblionumber | html %]</div>
132
                    <div class="hq-biblionumber content_hidden">[% itemsloo.biblionumber | html %]</div>
129
                    <div class="hq-author">[% itemsloo.author | html %]</div>
133
                    <div class="hq-author">[% itemsloo.author | html %]</div>
(-)a/opac/opac-basket.pl (-1 / +1 lines)
Lines 105-111 foreach my $biblionumber ( @bibs ) { Link Here
105
        }
105
        }
106
    }
106
    }
107
107
108
    my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
108
    my $subtitle         = GetRecordValue('subtitle', $record);
109
109
110
    my $hasauthors = 0;
110
    my $hasauthors = 0;
111
    if($dat->{'author'} || @$marcauthorsarray) {
111
    if($dat->{'author'} || @$marcauthorsarray) {
(-)a/opac/opac-detail.pl (-1 / +1 lines)
Lines 768-774 if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) { Link Here
768
}
768
}
769
769
770
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
770
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
771
my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
771
my $subtitle         = GetRecordValue('subtitle', $record);
772
772
773
if( C4::Context->preference('ArticleRequests') ) {
773
if( C4::Context->preference('ArticleRequests') ) {
774
    my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef;
774
    my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef;
(-)a/opac/opac-readingrecord.pl (-2 / +1 lines)
Lines 97-104 foreach my $issue ( @{$issues} ) { Link Here
97
        my $marc_rec =
97
        my $marc_rec =
98
          MARC::Record::new_from_xml( $marcxml, 'utf8',
98
          MARC::Record::new_from_xml( $marcxml, 'utf8',
99
            C4::Context->preference('marcflavour') );
99
            C4::Context->preference('marcflavour') );
100
        $issue->{subtitle} =
100
        $issue->{subtitle} = GetRecordValue( 'subtitle', $marc_rec );
101
          GetRecordValue( 'subtitle', $marc_rec, $issue->{frameworkcode} );
102
        $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, C4::Context->preference('marcflavour') );
101
        $issue->{normalized_upc} = GetNormalizedUPC( $marc_rec, C4::Context->preference('marcflavour') );
103
    }
102
    }
104
    # My Summary HTML
103
    # My Summary HTML
(-)a/opac/opac-reserve.pl (-2 / +4 lines)
Lines 391-397 $template->param('item_level_itypes' => $itemLevelTypes); Link Here
391
391
392
foreach my $biblioNum (@biblionumbers) {
392
foreach my $biblioNum (@biblionumbers) {
393
393
394
    my $record = GetMarcBiblio({ biblionumber => $biblioNum });
395
    # Init the bib item with the choices for branch pickup
394
    # Init the bib item with the choices for branch pickup
396
    my %biblioLoopIter;
395
    my %biblioLoopIter;
397
396
Lines 411-417 foreach my $biblioNum (@biblionumbers) { Link Here
411
    my $frameworkcode = GetFrameworkCode( $biblioData->{biblionumber} );
410
    my $frameworkcode = GetFrameworkCode( $biblioData->{biblionumber} );
412
    $biblioLoopIter{biblionumber} = $biblioData->{biblionumber};
411
    $biblioLoopIter{biblionumber} = $biblioData->{biblionumber};
413
    $biblioLoopIter{title} = $biblioData->{title};
412
    $biblioLoopIter{title} = $biblioData->{title};
414
    $biblioLoopIter{subtitle} = GetRecordValue('subtitle', $record, $frameworkcode);
413
    $biblioLoopIter{subtitle} = C4::Biblio::SplitSubtitle($biblioData->{'subtitle'});
414
    $biblioLoopIter{medium} = $biblioData->{medium};
415
    $biblioLoopIter{part_number} = $biblioData->{part_number};
416
    $biblioLoopIter{part_name} = $biblioData->{part_name};
415
    $biblioLoopIter{author} = $biblioData->{author};
417
    $biblioLoopIter{author} = $biblioData->{author};
416
    $biblioLoopIter{rank} = $biblioData->{rank};
418
    $biblioLoopIter{rank} = $biblioData->{rank};
417
    $biblioLoopIter{reservecount} = $biblioData->{reservecount};
419
    $biblioLoopIter{reservecount} = $biblioData->{reservecount};
(-)a/opac/opac-sendshelf.pl (-1 / +1 lines)
Lines 101-107 if ( $email ) { Link Here
101
101
102
        my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
102
        my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
103
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
103
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
104
        my $subtitle         = GetRecordValue('subtitle', $record, $fw);
104
        my $subtitle         = GetRecordValue('subtitle', $record);
105
105
106
        my @items = GetItemsInfo( $biblionumber );
106
        my @items = GetItemsInfo( $biblionumber );
107
107
(-)a/opac/opac-shelves.pl (-1 / +1 lines)
Lines 295-301 if ( $op eq 'view' ) { Link Here
295
                    $this_item->{notforloan}        = $itemtype->notforloan;
295
                    $this_item->{notforloan}        = $itemtype->notforloan;
296
                }
296
                }
297
                $this_item->{'coins'}           = GetCOinSBiblio($record);
297
                $this_item->{'coins'}           = GetCOinSBiblio($record);
298
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) );
298
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record ),
299
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
299
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
300
                $this_item->{'normalized_ean'}  = GetNormalizedEAN( $record, $marcflavour );
300
                $this_item->{'normalized_ean'}  = GetNormalizedEAN( $record, $marcflavour );
301
                $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour );
301
                $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour );
(-)a/opac/opac-showreviews.pl (-2 / +4 lines)
Lines 91-103 for my $result (@$reviews){ Link Here
91
    my $biblio = Koha::Biblios->find( $biblionumber );
91
    my $biblio = Koha::Biblios->find( $biblionumber );
92
    my $biblioitem = $biblio->biblioitem;
92
    my $biblioitem = $biblio->biblioitem;
93
    my $record = GetMarcBiblio({ biblionumber => $biblionumber });
93
    my $record = GetMarcBiblio({ biblionumber => $biblionumber });
94
    my $frameworkcode = GetFrameworkCode($biblionumber);
95
	$result->{normalized_upc} = GetNormalizedUPC($record,$marcflavour);
94
	$result->{normalized_upc} = GetNormalizedUPC($record,$marcflavour);
96
	$result->{normalized_ean} = GetNormalizedEAN($record,$marcflavour);
95
	$result->{normalized_ean} = GetNormalizedEAN($record,$marcflavour);
97
	$result->{normalized_oclc} = GetNormalizedOCLCNumber($record,$marcflavour);
96
	$result->{normalized_oclc} = GetNormalizedOCLCNumber($record,$marcflavour);
98
	$result->{normalized_isbn} = GetNormalizedISBN(undef,$record,$marcflavour);
97
	$result->{normalized_isbn} = GetNormalizedISBN(undef,$record,$marcflavour);
99
    $result->{title} = $biblio->title;
98
    $result->{title} = $biblio->title;
100
	$result->{subtitle} = GetRecordValue('subtitle', $record, $frameworkcode);
99
    $result->{subtitle} = GetRecordValue('subtitle', $record );
100
    $result->{medium} = $biblio->medium;
101
    $result->{part_number} = $biblio->part_number;
102
    $result->{part_name} = $biblio->part_name;
101
    $result->{author} = $biblio->author;
103
    $result->{author} = $biblio->author;
102
    $result->{place} = $biblioitem->place;
104
    $result->{place} = $biblioitem->place;
103
    $result->{publishercode} = $biblioitem->publishercode;
105
    $result->{publishercode} = $biblioitem->publishercode;
(-)a/opac/opac-tags.pl (-1 / +4 lines)
Lines 256-263 if ($loggedinuser) { Link Here
256
            $hidden_items = \@hidden_itemnumbers;
256
            $hidden_items = \@hidden_itemnumbers;
257
        }
257
        }
258
        next if ( $should_hide && scalar @all_items == scalar @hidden_itemnumbers );
258
        next if ( $should_hide && scalar @all_items == scalar @hidden_itemnumbers );
259
        $tag->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $tag->{biblionumber} ) );
260
        $tag->{title} = $biblio->title;
259
        $tag->{title} = $biblio->title;
260
        $tag->{subtitle} = C4::Biblio::SplitSubtitle($biblio->subtitle);
261
        $tag->{medium} = $biblio->medium;
262
        $tag->{part_number} = $biblio->part_number;
263
        $tag->{part_name} = $biblio->part_name;
261
        $tag->{author} = $biblio->author;
264
        $tag->{author} = $biblio->author;
262
265
263
        my $xslfile = C4::Context->preference('OPACXSLTResultsDisplay');
266
        my $xslfile = C4::Context->preference('OPACXSLTResultsDisplay');
(-)a/opac/opac-user.pl (-6 / +7 lines)
Lines 212-223 if ( $pending_checkouts->count ) { # Useless test Link Here
212
        );
212
        );
213
        $issue->{rentalfines} = $rental_fines->total_outstanding;
213
        $issue->{rentalfines} = $rental_fines->total_outstanding;
214
214
215
        my $marcrecord = GetMarcBiblio({
215
        $issue->{'subtitle'} = C4::Biblio::SplitSubtitle($issue->{'subtitle'});
216
            biblionumber => $issue->{'biblionumber'},
216
217
            embed_items  => 1,
218
            opac         => 1,
219
            borcat       => $borcat });
220
        $issue->{'subtitle'} = GetRecordValue('subtitle', $marcrecord, GetFrameworkCode($issue->{'biblionumber'}));
221
        # check if item is renewable
217
        # check if item is renewable
222
        my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
218
        my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
223
        ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
219
        ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
Lines 269-274 if ( $pending_checkouts->count ) { # Useless test Link Here
269
265
270
        my $isbn = GetNormalizedISBN($issue->{'isbn'});
266
        my $isbn = GetNormalizedISBN($issue->{'isbn'});
271
        $issue->{normalized_isbn} = $isbn;
267
        $issue->{normalized_isbn} = $isbn;
268
        my $marcrecord = GetMarcBiblio({
269
            biblionumber => $issue->{'biblionumber'},
270
            embed_items  => 1,
271
            opac         => 1,
272
            borcat       => $borcat });
272
        $issue->{normalized_upc} = GetNormalizedUPC( $marcrecord, C4::Context->preference('marcflavour') );
273
        $issue->{normalized_upc} = GetNormalizedUPC( $marcrecord, C4::Context->preference('marcflavour') );
273
274
274
                # My Summary HTML
275
                # My Summary HTML
(-)a/svc/checkouts (-5 / +9 lines)
Lines 23-29 use CGI; Link Here
23
use JSON qw(to_json);
23
use JSON qw(to_json);
24
24
25
use C4::Auth qw(check_cookie_auth haspermission get_session);
25
use C4::Auth qw(check_cookie_auth haspermission get_session);
26
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
26
use C4::Biblio qw(SplitSubtitle);
27
use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate);
27
use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate);
28
use C4::Overdues qw(GetFine);
28
use C4::Overdues qw(GetFine);
29
use C4::Context;
29
use C4::Context;
Lines 74-79 my $sql = ' Link Here
74
74
75
        biblionumber,
75
        biblionumber,
76
        biblio.title,
76
        biblio.title,
77
        biblio.subtitle,
78
        biblio.medium,
79
        biblio.part_number,
80
        biblio.part_name,
77
        author,
81
        author,
78
82
79
        itemnumber,
83
        itemnumber,
Lines 174-179 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
174
    my $checkout = {
178
    my $checkout = {
175
        DT_RowId             => $c->{itemnumber} . '-' . $c->{borrowernumber},
179
        DT_RowId             => $c->{itemnumber} . '-' . $c->{borrowernumber},
176
        title                => $c->{title},
180
        title                => $c->{title},
181
        subtitle             => C4::Biblio::SplitSubtitle($c->{'subtitle'}),
182
        medium               => $c->{medium} // '',
183
        part_number          => $c->{part_number} // '',
184
        part_name            => $c->{part_name} // '',
177
        author               => $c->{author},
185
        author               => $c->{author},
178
        barcode              => $c->{barcode},
186
        barcode              => $c->{barcode},
179
        itemtype             => $item_level_itypes ? $c->{itype} : $c->{itemtype},
187
        itemtype             => $item_level_itypes ? $c->{itype} : $c->{itemtype},
Lines 216-225 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
216
                as_due_date => 1
224
                as_due_date => 1
217
            }
225
            }
218
        ),
226
        ),
219
        subtitle => GetRecordValue(
220
            'subtitle',
221
            GetMarcBiblio({ biblionumber => $c->{biblionumber} }),
222
            GetFrameworkCode( $c->{biblionumber} ) ),
223
        lost    => $lost,
227
        lost    => $lost,
224
        damaged => $damaged,
228
        damaged => $damaged,
225
        borrower => {
229
        borrower => {
(-)a/svc/holds (-8 / +9 lines)
Lines 23-29 use CGI; Link Here
23
use JSON qw(to_json);
23
use JSON qw(to_json);
24
24
25
use C4::Auth qw(check_cookie_auth);
25
use C4::Auth qw(check_cookie_auth);
26
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
26
use C4::Biblio qw(SplitSubtitle);
27
use C4::Charset;
27
use C4::Charset;
28
use C4::Circulation qw(GetTransfers);
28
use C4::Circulation qw(GetTransfers);
29
use C4::Context;
29
use C4::Context;
Lines 84-94 while ( my $h = $holds_rs->next() ) { Link Here
84
    for my $library ( @$libraries ) {
84
    for my $library ( @$libraries ) {
85
        $library->{selected} = 1 if $library->{branchcode} eq $h->branchcode();
85
        $library->{selected} = 1 if $library->{branchcode} eq $h->branchcode();
86
    }
86
    }
87
88
    my $biblio = $h->biblio();
87
    my $hold = {
89
    my $hold = {
88
        DT_RowId       => $h->reserve_id(),
90
        DT_RowId       => $h->reserve_id(),
89
        biblionumber   => $biblionumber,
91
        biblionumber   => $biblionumber,
90
        title          => $h->biblio()->title(),
92
        title          => $biblio->title(),
91
        author         => $h->biblio()->author(),
93
        subtitle       => C4::Biblio::SplitSubtitles($biblio->subtitle()),
94
        medium         => $biblio->medium(),
95
        part_number    => $biblio->part_number(),
96
        part_name      => $biblio->part_name(),
97
        author         => $biblio->author(),
92
        reserve_id     => $h->reserve_id(),
98
        reserve_id     => $h->reserve_id(),
93
        branchcode     => $h->branch()->branchname(),
99
        branchcode     => $h->branch()->branchname(),
94
        branches       => $libraries,
100
        branches       => $libraries,
Lines 102-112 while ( my $h = $holds_rs->next() ) { Link Here
102
        waiting_here   => $h->branch()->branchcode() eq $branch,
108
        waiting_here   => $h->branch()->branchcode() eq $branch,
103
        priority       => $h->priority(),
109
        priority       => $h->priority(),
104
        itemtype_limit => $itemtype_limit,
110
        itemtype_limit => $itemtype_limit,
105
        subtitle       => GetRecordValue(
106
            'subtitle',
107
            GetMarcBiblio({ biblionumber => $biblionumber }),
108
            GetFrameworkCode($biblionumber)
109
        ),
110
        reservedate_formatted => $h->reservedate() ? output_pref(
111
        reservedate_formatted => $h->reservedate() ? output_pref(
111
            { dt => dt_from_string( $h->reservedate() ), dateonly => 1 }
112
            { dt => dt_from_string( $h->reservedate() ), dateonly => 1 }
112
          )
113
          )
(-)a/t/Biblio.t (-1 / +1 lines)
Lines 51-57 warning_is { $ret = BiblioAutoLink(undef, q{}) } Link Here
51
51
52
is( $ret, 0, 'BiblioAutoLink returns zero if not passed rec');
52
is( $ret, 0, 'BiblioAutoLink returns zero if not passed rec');
53
53
54
warning_is { $ret = GetRecordValue('100', undef, q{}) }
54
warning_is { $ret = GetRecordValue('100', undef) }
55
           { carped => 'GetRecordValue called with undefined record'},
55
           { carped => 'GetRecordValue called with undefined record'},
56
           "GetRecordValue returns carped warning on undef record";
56
           "GetRecordValue returns carped warning on undef record";
57
57
(-)a/t/Biblio2.t (+16 lines)
Lines 52-55 sub _koha_marc_update_bib_ids_control { Link Here
52
    is($r->field('004')->data(), 20, 'Biblioitemnumber to control field');
52
    is($r->field('004')->data(), 20, 'Biblioitemnumber to control field');
53
}
53
}
54
54
55
subtest 'SplitSubtitle' => sub {
56
    plan tests => 4;
57
58
    my $res = C4::Biblio::SplitSubtitle(undef);
59
    is_deeply($res, [], 'undef returned as an array');
60
61
    $res = C4::Biblio::SplitSubtitle('');
62
    is_deeply($res, [], 'Empty string returned as an array');
63
64
    $res = C4::Biblio::SplitSubtitle('Single');
65
    is_deeply($res, [{'subfield' => 'Single'}], 'Single subtitle returns an array');
66
67
    $res = C4::Biblio::SplitSubtitle('First | Second');
68
    is_deeply($res, [{'subfield' => 'First'}, {'subfield' => 'Second'}], 'Two subtitles returns an array');
69
};
70
55
done_testing();
71
done_testing();
(-)a/tags/list.pl (-4 / +1 lines)
Lines 61-70 else { Link Here
61
        my $taglist = get_tag_rows( { term => $tag } );
61
        my $taglist = get_tag_rows( { term => $tag } );
62
        for ( @{$taglist} ) {
62
        for ( @{$taglist} ) {
63
            my $dat    = &GetBiblioData( $_->{biblionumber} );
63
            my $dat    = &GetBiblioData( $_->{biblionumber} );
64
            my $record = &GetMarcBiblio({ biblionumber => $_->{biblionumber} });
64
            $dat->{'subtitle'} = C4::Biblio::SplitSubtitles($dat->{'subtitle'}),
65
            $dat->{'subtitle'} =
66
              GetRecordValue( 'subtitle', $record,
67
                GetFrameworkCode( $_->{biblionumber} ) );
68
            my @items = GetItemsInfo( $_->{biblionumber} );
65
            my @items = GetItemsInfo( $_->{biblionumber} );
69
            $dat->{biblionumber} = $_->{biblionumber};
66
            $dat->{biblionumber} = $_->{biblionumber};
70
            $dat->{tag_id}       = $_->{tag_id};
67
            $dat->{tag_id}       = $_->{tag_id};
(-)a/tools/batch_delete_records.pl (-1 / +1 lines)
Lines 94-100 if ( $op eq 'form' ) { Link Here
94
            my $holds_count = $biblio->holds->count;
94
            my $holds_count = $biblio->holds->count;
95
            $biblio = $biblio->unblessed;
95
            $biblio = $biblio->unblessed;
96
            my $record = &GetMarcBiblio({ biblionumber => $record_id });
96
            my $record = &GetMarcBiblio({ biblionumber => $record_id });
97
            $biblio->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $record_id ) );
97
            $biblio->{subtitle} = C4::Biblio::SplitSubtitle( $biblio->{subtitle} );
98
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
98
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
99
            $biblio->{holds_count} = $holds_count;
99
            $biblio->{holds_count} = $holds_count;
100
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
100
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
(-)a/virtualshelves/sendshelf.pl (-2 / +1 lines)
Lines 77-90 if ($email) { Link Here
77
77
78
    while ( my $content = $contents->next ) {
78
    while ( my $content = $contents->next ) {
79
        my $biblionumber     = $content->biblionumber;
79
        my $biblionumber     = $content->biblionumber;
80
        my $fw               = GetFrameworkCode($biblionumber);
81
        my $dat              = GetBiblioData($biblionumber);
80
        my $dat              = GetBiblioData($biblionumber);
82
        my $record           = GetMarcBiblio({
81
        my $record           = GetMarcBiblio({
83
            biblionumber => $biblionumber,
82
            biblionumber => $biblionumber,
84
            embed_items  => 1 });
83
            embed_items  => 1 });
85
        my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
84
        my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
86
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
85
        my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
87
        my $subtitle         = GetRecordValue( 'subtitle', $record, $fw );
86
        my $subtitle         = GetRecordValue( 'subtitle', $record );
88
87
89
        my @items = GetItemsInfo($biblionumber);
88
        my @items = GetItemsInfo($biblionumber);
90
89
(-)a/virtualshelves/shelves.pl (-2 / +1 lines)
Lines 280-286 if ( $op eq 'view' ) { Link Here
280
                $this_item->{description}       = $itemtype ? $itemtype->description : q{}; #FIXME Should this be translated_description ?
280
                $this_item->{description}       = $itemtype ? $itemtype->description : q{}; #FIXME Should this be translated_description ?
281
                $this_item->{notforloan}        = $itemtype->notforloan if $itemtype;
281
                $this_item->{notforloan}        = $itemtype->notforloan if $itemtype;
282
                $this_item->{'coins'}           = GetCOinSBiblio($record);
282
                $this_item->{'coins'}           = GetCOinSBiblio($record);
283
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) );
283
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record );
284
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
284
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
285
                $this_item->{'normalized_ean'}  = GetNormalizedEAN( $record, $marcflavour );
285
                $this_item->{'normalized_ean'}  = GetNormalizedEAN( $record, $marcflavour );
286
                $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour );
286
                $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour );
287
- 

Return to bug 11529