Bug 30813: (follow-up) Correct C4::Breeding call
This patch changes the call to use the fully qualified name and adds import to C4::Breeding, Koha::MetaSearcher, and removes import from Koha::MetadataRecord Additionally it replaces missing fields from the update to using TransformMarcToKoha Lastly, it reduces the fields used when saving the bredding record to the reservoir Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
ef845aa682
commit
7f10ee6df0
|
|
@ -308,7 +308,10 @@ sub _handle_one_result {
|
|||
if( $breedingid ){
|
||||
my @kohafields = ('biblio.title','biblio.author','biblioitems.isbn','biblioitems.lccn','biblioitems.editionstatement');
|
||||
push @kohafields, C4::Context->preference('marcflavour') eq "MARC21" ? 'biblio.copyrightdate' : 'biblioitems.publicationyear';
|
||||
$row = TransformMarcToKoha({ record => $marcrecord, kohafields => \@kohafields, limit_table => 'no_items' });
|
||||
$row = C4::Biblio::TransformMarcToKoha({ record => $marcrecord, kohafields => \@kohafields, limit_table => 'no_items' });
|
||||
$row->{biblionumber} = $bib;
|
||||
$row->{server} = $servhref->{servername};
|
||||
$row->{breedingid} = $breedingid;
|
||||
$row->{isbn}=_isbn_replace($row->{isbn});
|
||||
$row = _add_custom_field_rowdata($row, $marcrecord);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1685,7 +1685,7 @@ sub _parse_biblio_fields {
|
|||
my ($marc_record) = @_;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $bibliofields = TransformMarcToKoha({ record => $marc_record });
|
||||
my $bibliofields = TransformMarcToKoha({ record => $marc_record, kohafields => ['biblio.title','biblio.author','biblioitems.isbn','biblioitems.issn'] });
|
||||
return ($bibliofields->{'title'}, $bibliofields->{'author'}, $bibliofields->{'isbn'}, $bibliofields->{'issn'});
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ use Modern::Perl;
|
|||
|
||||
use base 'Class::Accessor';
|
||||
|
||||
use C4::Biblio;
|
||||
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
|
||||
use C4::Search qw( new_record_from_zebra );
|
||||
use DBIx::Class::ResultClass::HashRefInflator;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ and authority) records in Koha.
|
|||
use Modern::Perl;
|
||||
|
||||
use Carp qw( carp );
|
||||
use C4::Biblio;
|
||||
use Koha::Util::MARC;
|
||||
|
||||
use base qw(Class::Accessor);
|
||||
|
|
|
|||
Loading…
Reference in New Issue