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 633-671 sub _check_valid_auth_link { Link Here
633
634
634
=head2 GetRecordValue
635
=head2 GetRecordValue
635
636
636
  my $values = GetRecordValue($field, $record, $frameworkcode);
637
  my $values = GetRecordValue($field, $record);
637
638
638
Get MARC fields from a keyword defined in fieldmapping table.
639
Get MARC fields from the record using the framework mappings for biblio fields.
639
640
640
=cut
641
=cut
641
642
642
sub GetRecordValue {
643
sub GetRecordValue {
643
    my ( $field, $record, $frameworkcode ) = @_;
644
    my ( $field, $record ) = @_;
644
645
645
    if (!$record) {
646
    if (!$record) {
646
        carp 'GetRecordValue called with undefined record';
647
        carp 'GetRecordValue called with undefined record';
647
        return;
648
        return;
648
    }
649
    }
649
    my $dbh = C4::Context->dbh;
650
651
    my $sth = $dbh->prepare('SELECT fieldcode, subfieldcode FROM fieldmapping WHERE frameworkcode = ? AND field = ?');
652
    $sth->execute( $frameworkcode, $field );
653
654
    my @result = ();
655
656
    while ( my $row = $sth->fetchrow_hashref ) {
657
        foreach my $field ( $record->field( $row->{fieldcode} ) ) {
658
            if ( ( $row->{subfieldcode} ne "" && $field->subfield( $row->{subfieldcode} ) ) ) {
659
                foreach my $subfield ( $field->subfield( $row->{subfieldcode} ) ) {
660
                    push @result, { 'subfield' => $subfield };
661
                }
662
650
663
            } elsif ( $row->{subfieldcode} eq "" ) {
651
    my @result;
664
                push @result, { 'subfield' => $field->as_string() };
652
    my @mss = GetMarcSubfieldStructureFromKohaField("biblio.$field");
653
    foreach my $fldhash ( @mss ) {
654
        my $tag = $fldhash->{tagfield};
655
        my $sub = $fldhash->{tagsubfield};
656
        foreach my $fld ( $record->field($tag) ) {
657
            if( $sub eq '@' || $fld->is_control_field ) {
658
                push @result, $fld->data if $fld->data;
659
            } else {
660
                push @result, grep { $_ } $fld->subfield($sub);
665
            }
661
            }
666
        }
662
        }
667
    }
663
    }
668
669
    return \@result;
664
    return \@result;
670
}
665
}
671
666
Lines 3609-3614 sub RemoveAllNsb { Link Here
3609
    return $record;
3604
    return $record;
3610
}
3605
}
3611
3606
3607
=head2 SplitSubtitle
3608
3609
    $subtitles = SplitSubtitle($subtitle);
3610
3611
Splits a subtitle field to an array of hashes like the one GetRecordValue returns
3612
3613
=cut
3614
3615
sub SplitSubtitle {
3616
    my $subtitle = shift;
3617
3618
    my @subtitles = map( { 'subfield' => $_ }, split(/ \| /, $subtitle // '' ) );
3619
3620
    return \@subtitles;
3621
}
3622
3612
1;
3623
1;
3613
3624
3614
3625
(-)a/C4/HoldsQueue.pm (-8 / +9 lines)
Lines 131-137 sub GetHoldsQueueItems { Link Here
131
    my $dbh   = C4::Context->dbh;
131
    my $dbh   = C4::Context->dbh;
132
132
133
    my @bind_params = ();
133
    my @bind_params = ();
134
    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
134
    my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, biblioitems.itemtype, items.location,
135
                         items.enumchron, items.cn_sort, biblioitems.publishercode,
136
                         biblio.copyrightdate, biblio.subtitle, biblio.part_number,
137
                         biblio.part_name,
138
                         biblioitems.publicationyear, biblioitems.pages, biblioitems.size, biblioitems.publicationyear,
139
                         biblioitems.isbn, items.copynumber
135
                  FROM tmp_holdsqueue
140
                  FROM tmp_holdsqueue
136
                       JOIN biblio      USING (biblionumber)
141
                       JOIN biblio      USING (biblionumber)
137
                  LEFT JOIN biblioitems USING (biblionumber)
142
                  LEFT JOIN biblioitems USING (biblionumber)
Lines 146-164 sub GetHoldsQueueItems { Link Here
146
    $sth->execute(@bind_params);
151
    $sth->execute(@bind_params);
147
    my $items = [];
152
    my $items = [];
148
    while ( my $row = $sth->fetchrow_hashref ){
153
    while ( my $row = $sth->fetchrow_hashref ){
149
        my $record = GetMarcBiblio({ biblionumber => $row->{biblionumber} });
150
        if ($record){
151
            $row->{subtitle} = [ map { $_->{subfield} } @{ GetRecordValue( 'subtitle', $record, '' ) } ];
152
            $row->{parts} = GetRecordValue('parts',$record,'')->[0]->{subfield};
153
            $row->{numbers} = GetRecordValue('numbers',$record,'')->[0]->{subfield};
154
        }
155
156
        # return the bib-level or item-level itype per syspref
154
        # return the bib-level or item-level itype per syspref
157
        if (!C4::Context->preference('item-level_itypes')) {
155
        if (!C4::Context->preference('item-level_itypes')) {
158
            $row->{itype} = $row->{itemtype};
156
            $row->{itype} = $row->{itemtype};
159
        }
157
        }
160
        delete $row->{itemtype};
158
        delete $row->{itemtype};
161
159
160
        my @subtitles = split(/ \| /, $row->{'subtitle'} // '' );
161
        $row->{'subtitle'} = \@subtitles;
162
162
        push @$items, $row;
163
        push @$items, $row;
163
    }
164
    }
164
    return $items;
165
    return $items;
(-)a/C4/Overdues.pm (+4 lines)
Lines 750-755 sub GetOverduesForBranch { Link Here
750
            borrowers.phone,
750
            borrowers.phone,
751
            borrowers.email,
751
            borrowers.email,
752
               biblio.title,
752
               biblio.title,
753
               biblio.subtitle,
754
               biblio.medium,
755
               biblio.part_number,
756
               biblio.part_name,
753
               biblio.author,
757
               biblio.author,
754
               biblio.biblionumber,
758
               biblio.biblionumber,
755
               issues.date_due,
759
               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 65-84 sub store { Link Here
65
65
66
my @subtitles = $biblio->subtitles();
66
my @subtitles = $biblio->subtitles();
67
67
68
Returns list of subtitles for a record.
68
Returns list of subtitles for a record according to the framework.
69
70
Keyword to MARC mapping for subtitle must be set for this method to return any possible values.
71
69
72
=cut
70
=cut
73
71
74
sub subtitles {
72
sub subtitles {
75
    my ( $self ) = @_;
73
    my ( $self ) = @_;
76
74
77
    return map { $_->{subfield} } @{
75
    my @subtitles = split( / \| /, $self->subtitle // '' );
78
        C4::Biblio::GetRecordValue(
76
    return @subtitles;
79
            'subtitle',
80
            C4::Biblio::GetMarcBiblio({ biblionumber => $self->id }),
81
            $self->frameworkcode ) };
82
}
77
}
83
78
84
=head3 can_article_request
79
=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 78-84 Link Here
78
            <td>
78
            <td>
79
            <p>
79
            <p>
80
                [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
80
                [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
81
                [% reserveloo.title | html %] [% FOREACH s IN reserveloo.subtitle %] [% s | html %][% END %]</a></p>
81
                [% reserveloo.title | html %] [% FOREACH s IN reserveloo.subtitle %] [% s | html %][% END %] [% reserveloo.part_number | html %] [% reserveloo.part_name | html %]</a></p>
82
                [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %]
82
                [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %]
83
            </td>
83
            </td>
84
        [% ELSE %]
84
        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-1 / +5 lines)
Lines 119-125 Link Here
119
     <tbody>[% FOREACH itemsloo IN itemsloop %]
119
     <tbody>[% FOREACH itemsloo IN itemsloop %]
120
        <tr>
120
        <tr>
121
            <td class="hq-title">
121
            <td class="hq-title">
122
                <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>
122
                <p>
123
                    <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber | uri %]">
124
                        <strong>[% itemsloo.title | html %]</strong> [% FOREACH s IN itemsloo.subtitle %] [% s | html %][% END %] [% itemsloo.part_number | html %] [% itemsloo.part_name | html %]
125
                    </a>
126
                </p>
123
                <p>
127
                <p>
124
                    <div class="hq-biblionumber content_hidden">[% itemsloo.biblionumber | html %]</div>
128
                    <div class="hq-biblionumber content_hidden">[% itemsloo.biblionumber | html %]</div>
125
                    <div class="hq-author">[% itemsloo.author | html %]</div>
129
                    <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 766-772 if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) { Link Here
766
}
766
}
767
767
768
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
768
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
769
my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
769
my $subtitle         = GetRecordValue('subtitle', $record);
770
770
771
if( C4::Context->preference('ArticleRequests') ) {
771
if( C4::Context->preference('ArticleRequests') ) {
772
    my $patron = $borrowernumber ? Koha::Patrons->find($borrowernumber) : undef;
772
    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 390-396 $template->param('item_level_itypes' => $itemLevelTypes); Link Here
390
foreach my $biblioNum (@biblionumbers) {
390
foreach my $biblioNum (@biblionumbers) {
391
391
392
    my @not_available_at = ();
392
    my @not_available_at = ();
393
    my $record = GetMarcBiblio({ biblionumber => $biblioNum });
394
    # Init the bib item with the choices for branch pickup
393
    # Init the bib item with the choices for branch pickup
395
    my %biblioLoopIter;
394
    my %biblioLoopIter;
396
395
Lines 404-410 foreach my $biblioNum (@biblionumbers) { Link Here
404
    my $frameworkcode = GetFrameworkCode( $biblioData->{biblionumber} );
403
    my $frameworkcode = GetFrameworkCode( $biblioData->{biblionumber} );
405
    $biblioLoopIter{biblionumber} = $biblioData->{biblionumber};
404
    $biblioLoopIter{biblionumber} = $biblioData->{biblionumber};
406
    $biblioLoopIter{title} = $biblioData->{title};
405
    $biblioLoopIter{title} = $biblioData->{title};
407
    $biblioLoopIter{subtitle} = GetRecordValue('subtitle', $record, $frameworkcode);
406
    $biblioLoopIter{subtitle} = C4::Biblio::SplitSubtitle($biblioData->{'subtitle'});
407
    $biblioLoopIter{medium} = $biblioData->{medium};
408
    $biblioLoopIter{part_number} = $biblioData->{part_number};
409
    $biblioLoopIter{part_name} = $biblioData->{part_name};
408
    $biblioLoopIter{author} = $biblioData->{author};
410
    $biblioLoopIter{author} = $biblioData->{author};
409
    $biblioLoopIter{rank} = $biblioData->{rank};
411
    $biblioLoopIter{rank} = $biblioData->{rank};
410
    $biblioLoopIter{reservecount} = $biblioData->{reservecount};
412
    $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 268-273 if ( $pending_checkouts->count ) { # Useless test Link Here
268
264
269
        my $isbn = GetNormalizedISBN($issue->{'isbn'});
265
        my $isbn = GetNormalizedISBN($issue->{'isbn'});
270
        $issue->{normalized_isbn} = $isbn;
266
        $issue->{normalized_isbn} = $isbn;
267
        my $marcrecord = GetMarcBiblio({
268
            biblionumber => $issue->{'biblionumber'},
269
            embed_items  => 1,
270
            opac         => 1,
271
            borcat       => $borcat });
271
        $issue->{normalized_upc} = GetNormalizedUPC( $marcrecord, C4::Context->preference('marcflavour') );
272
        $issue->{normalized_upc} = GetNormalizedUPC( $marcrecord, C4::Context->preference('marcflavour') );
272
273
273
                # My Summary HTML
274
                # 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 84-90 if ( $op eq 'form' ) { Link Here
84
            my $holds_count = $biblio->holds->count;
84
            my $holds_count = $biblio->holds->count;
85
            $biblio = $biblio->unblessed;
85
            $biblio = $biblio->unblessed;
86
            my $record = &GetMarcBiblio({ biblionumber => $record_id });
86
            my $record = &GetMarcBiblio({ biblionumber => $record_id });
87
            $biblio->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $record_id ) );
87
            $biblio->{subtitle} = C4::Biblio::SplitSubtitle( $biblio->{subtitle} );
88
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
88
            $biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
89
            $biblio->{holds_count} = $holds_count;
89
            $biblio->{holds_count} = $holds_count;
90
            $biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
90
            $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 279-285 if ( $op eq 'view' ) { Link Here
279
                $this_item->{description}       = $itemtype ? $itemtype->description : q{}; #FIXME Should this be translated_description ?
279
                $this_item->{description}       = $itemtype ? $itemtype->description : q{}; #FIXME Should this be translated_description ?
280
                $this_item->{notforloan}        = $itemtype->notforloan if $itemtype;
280
                $this_item->{notforloan}        = $itemtype->notforloan if $itemtype;
281
                $this_item->{'coins'}           = GetCOinSBiblio($record);
281
                $this_item->{'coins'}           = GetCOinSBiblio($record);
282
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $biblionumber ) );
282
                $this_item->{'subtitle'}        = GetRecordValue( 'subtitle', $record );
283
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
283
                $this_item->{'normalized_upc'}  = GetNormalizedUPC( $record, $marcflavour );
284
                $this_item->{'normalized_ean'}  = GetNormalizedEAN( $record, $marcflavour );
284
                $this_item->{'normalized_ean'}  = GetNormalizedEAN( $record, $marcflavour );
285
                $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour );
285
                $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber( $record, $marcflavour );
286
- 

Return to bug 11529