Bug 29897: Rename get_marc_authors with get_marc_contributors
get_marc_authors actually return authors from 700..712, not the first author from 200 Sponsored-by: Orex Digital Signed-off-by: Orex Digital <info@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
27fa89648e
commit
7b74bedd2d
8 changed files with 13 additions and 13 deletions
|
@ -1001,16 +1001,16 @@ sub get_marc_notes {
|
||||||
return \@marcnotes;
|
return \@marcnotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
=head3 get_marc_authors
|
=head3 get_marc_contributors
|
||||||
|
|
||||||
my $authors = $biblio->get_marc_authors;
|
my $contributors = $biblio->get_marc_contributors;
|
||||||
|
|
||||||
Get all authors from the MARC record and returns them in an array.
|
Get all contributors (but first author) from the MARC record and returns them in an array.
|
||||||
The authors are stored in different fields depending on MARC flavour
|
They are stored in different fields depending on MARC flavour
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub get_marc_authors {
|
sub get_marc_contributors {
|
||||||
my ( $self, $params ) = @_;
|
my ( $self, $params ) = @_;
|
||||||
|
|
||||||
my ( $mintag, $maxtag, $fields_filter );
|
my ( $mintag, $maxtag, $fields_filter );
|
||||||
|
|
|
@ -68,7 +68,7 @@ foreach my $biblionumber ( @bibs ) {
|
||||||
my $dat = $biblio->unblessed;
|
my $dat = $biblio->unblessed;
|
||||||
my $record = $biblio->metadata->record;
|
my $record = $biblio->metadata->record;
|
||||||
my $marcnotesarray = $biblio->get_marc_notes;
|
my $marcnotesarray = $biblio->get_marc_notes;
|
||||||
my $marcauthorsarray = $biblio->get_marc_authors;
|
my $marcauthorsarray = $biblio->get_marc_contributors;
|
||||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||||
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
|
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
|
||||||
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
|
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
|
||||||
|
|
|
@ -73,7 +73,7 @@ if ( $email_add ) {
|
||||||
my $biblio = Koha::Biblios->find( $biblionumber ) or next;
|
my $biblio = Koha::Biblios->find( $biblionumber ) or next;
|
||||||
my $dat = $biblio->unblessed;
|
my $dat = $biblio->unblessed;
|
||||||
my $record = $biblio->metadata->record({ embed_items => 1 });
|
my $record = $biblio->metadata->record({ embed_items => 1 });
|
||||||
my $marcauthorsarray = $biblio->get_marc_authors;
|
my $marcauthorsarray = $biblio->get_marc_contributors;
|
||||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||||
|
|
||||||
my @items = GetItemsInfo( $biblionumber );
|
my @items = GetItemsInfo( $biblionumber );
|
||||||
|
|
|
@ -84,7 +84,7 @@ foreach my $biblionumber ( @bibs ) {
|
||||||
$record_processor->process($record);
|
$record_processor->process($record);
|
||||||
next unless $record;
|
next unless $record;
|
||||||
my $marcnotesarray = $biblio->get_marc_notes({ opac => 1 });
|
my $marcnotesarray = $biblio->get_marc_notes({ opac => 1 });
|
||||||
my $marcauthorsarray = $biblio->get_marc_authors;
|
my $marcauthorsarray = $biblio->get_marc_contributors;
|
||||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||||
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
|
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
|
||||||
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
|
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
|
||||||
|
|
|
@ -85,7 +85,7 @@ if ( $email_add ) {
|
||||||
patron => $patron,
|
patron => $patron,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
my $marcauthorsarray = $biblio->get_marc_authors;
|
my $marcauthorsarray = $biblio->get_marc_contributors;
|
||||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||||
|
|
||||||
my @items = GetItemsInfo( $biblionumber );
|
my @items = GetItemsInfo( $biblionumber );
|
||||||
|
|
|
@ -94,7 +94,7 @@ if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
|
||||||
next unless $record;
|
next unless $record;
|
||||||
my $fw = GetFrameworkCode($biblionumber);
|
my $fw = GetFrameworkCode($biblionumber);
|
||||||
|
|
||||||
my $marcauthorsarray = $biblio->get_marc_authors;
|
my $marcauthorsarray = $biblio->get_marc_contributors;
|
||||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||||
|
|
||||||
my @items = GetItemsInfo( $biblionumber );
|
my @items = GetItemsInfo( $biblionumber );
|
||||||
|
|
|
@ -881,7 +881,7 @@ subtest 'current_checkouts() and old_checkouts() tests' => sub {
|
||||||
$schema->storage->txn_rollback;
|
$schema->storage->txn_rollback;
|
||||||
};
|
};
|
||||||
|
|
||||||
subtest 'get_marc_authors() tests' => sub {
|
subtest 'get_marc_contributors() tests' => sub {
|
||||||
|
|
||||||
plan tests => 1;
|
plan tests => 1;
|
||||||
|
|
||||||
|
@ -904,7 +904,7 @@ subtest 'get_marc_authors() tests' => sub {
|
||||||
C4::Biblio::ModBiblio( $record, $biblio->biblionumber );
|
C4::Biblio::ModBiblio( $record, $biblio->biblionumber );
|
||||||
$biblio = Koha::Biblios->find( $biblio->biblionumber );
|
$biblio = Koha::Biblios->find( $biblio->biblionumber );
|
||||||
|
|
||||||
is( 4, @{$biblio->get_marc_authors}, 'get_marc_authors retrieves correct number of author subfields' );
|
is( 4, @{$biblio->get_marc_contributors}, 'get_marc_contributors retrieves correct number of author subfields' );
|
||||||
$schema->storage->txn_rollback;
|
$schema->storage->txn_rollback;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ if ($to_address) {
|
||||||
my $biblio = Koha::Biblios->find( $biblionumber ) or next;
|
my $biblio = Koha::Biblios->find( $biblionumber ) or next;
|
||||||
my $dat = $biblio->unblessed;
|
my $dat = $biblio->unblessed;
|
||||||
my $record = $biblio->metadata->record({ embed_items => 1 });
|
my $record = $biblio->metadata->record({ embed_items => 1 });
|
||||||
my $marcauthorsarray = $biblio->get_marc_authors;
|
my $marcauthorsarray = $biblio->get_marc_contributors;
|
||||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||||
|
|
||||||
my @items = GetItemsInfo($biblionumber);
|
my @items = GetItemsInfo($biblionumber);
|
||||||
|
|
Loading…
Reference in a new issue