Bugzilla – Attachment 135768 Details for
Bug 30813
Refactor TransformMarcToKoha to remove TransformMarcToKohaOneField
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30813: (follow-up) Correct C4::Breeding call
Bug-30813-follow-up-Correct-C4Breeding-call.patch (text/plain), 3.18 KB, created by
Marcel de Rooy
on 2022-06-07 13:00:18 UTC
(
hide
)
Description:
Bug 30813: (follow-up) Correct C4::Breeding call
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-06-07 13:00:18 UTC
Size:
3.18 KB
patch
obsolete
>From 9db8992fd5779a7fc0746daa99b7bfd680b1e5c2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 26 May 2022 11:54:44 +0000 >Subject: [PATCH] Bug 30813: (follow-up) Correct C4::Breeding call >MIME-Version: 1.0 >Content-Type: text/plain; charset=utf-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset=utf-8 > >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> >--- > C4/Breeding.pm | 5 ++++- > C4/ImportBatch.pm | 2 +- > Koha/MetaSearcher.pm | 1 + > Koha/MetadataRecord.pm | 1 - > 4 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index 48ea5acfab..866350b645 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -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); > } >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 1dffc9a5b1..e72377f93a 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -1714,7 +1714,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'}); > > } >diff --git a/Koha/MetaSearcher.pm b/Koha/MetaSearcher.pm >index 16a343f48d..e33e69b323 100644 >--- a/Koha/MetaSearcher.pm >+++ b/Koha/MetaSearcher.pm >@@ -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; >diff --git a/Koha/MetadataRecord.pm b/Koha/MetadataRecord.pm >index b288d98c1d..6f0aa1fb4b 100644 >--- a/Koha/MetadataRecord.pm >+++ b/Koha/MetadataRecord.pm >@@ -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); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30813
:
135232
|
135233
|
135234
|
135235
|
135239
|
135240
|
135241
|
135242
|
135243
|
135302
|
135303
|
135304
|
135305
|
135306
|
135371
|
135374
|
135375
|
135376
|
135377
|
135378
|
135379
|
135763
|
135764
|
135765
|
135766
|
135767
| 135768 |
135769
|
135803
|
135825