Bugzilla – Attachment 157507 Details for
Bug 35115
ERM - Potential MARC data loss when importing titles from list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35115: Prefix biblio hash with table name
Bug-35115-Prefix-biblio-hash-with-table-name.patch (text/plain), 2.30 KB, created by
Pedro Amorim
on 2023-10-20 11:57:00 UTC
(
hide
)
Description:
Bug 35115: Prefix biblio hash with table name
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-10-20 11:57:00 UTC
Size:
2.30 KB
patch
obsolete
>From 888acb98ff57fff66c56be5913fa6b1c0730e764 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 20 Oct 2023 11:55:58 +0000 >Subject: [PATCH] Bug 35115: Prefix biblio hash with table name > >It seems TransformKohaToMarc requires the input to be prefixed with the table name, like this: > { > 'biblio.abstract' => undef, > 'biblio.subtitle' => undef, > 'biblio.frameworkcode' => 'BKS', > 'biblio.medium' => undef, > 'biblio.part_name' => undef, > 'biblio.copyrightdate' => 2008, > 'biblio.seriestitle' => undef, > 'biblio.notes' => 'Originally published: 2008.', > 'biblio.biblionumber' => 299, > 'biblio.serial' => undef, > 'biblio.title' => 'Kluge :', > 'biblio.datecreated' => '2014-05-07', > 'biblio.part_number' => undef, > 'biblio.author' => 'Marcus, Gary F.', > 'biblio.timestamp' => '2020-04-21 09:38:26', > 'biblio.unititle' => undef > }; > >but we were using this: > > { > 'abstract' => undef, > 'notes' => 'Originally published: 2008.', > 'medium' => undef, > 'subtitle' => undef, > 'title' => 'Kluge :', > 'author' => 'Marcus, Gary F.', > 'serial' => undef, > 'timestamp' => '2020-04-21 09:38:26', > 'biblionumber' => 299, > 'part_name' => undef, > 'datecreated' => '2014-05-07', > 'part_number' => undef, > 'seriestitle' => undef, > 'unititle' => undef, > 'frameworkcode' => 'BKS', > 'copyrightdate' => 2008 > }; > >ATTENTION: This does not solve the whole issue, i.e. MARC fields not mapped to Koha fields will still be stripped. >More work required. >--- > Koha/ERM/EHoldings/Resource.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/Koha/ERM/EHoldings/Resource.pm b/Koha/ERM/EHoldings/Resource.pm >index 2457b2d644..e4d9e4ee89 100644 >--- a/Koha/ERM/EHoldings/Resource.pm >+++ b/Koha/ERM/EHoldings/Resource.pm >@@ -55,6 +55,10 @@ sub store { > ? Koha::Biblios->find( $title->biblio_id )->unblessed > : {}; > >+ foreach my $biblio_field ( keys %$biblio ) { >+ $biblio->{ 'biblio.' . $biblio_field } = delete $biblio->{$biblio_field}; >+ } >+ > my $marc_record = TransformKohaToMarc( > { > %$biblio, >-- >2.30.2
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 35115
:
157507
|
158085
|
158672
|
158748
|
158806
|
158807
|
159254
|
159255