Bugzilla – Attachment 65540 Details for
Bug 10306
Koha to MARC mappings (Part 1): Allow multiple mappings per kohafield (for say 260/RDA 264)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10306: Allow controlfields in TransformKohaToMarc
Bug-10306-Allow-controlfields-in-TransformKohaToMa.patch (text/plain), 1.28 KB, created by
Marcel de Rooy
on 2017-08-07 13:08:00 UTC
(
hide
)
Description:
Bug 10306: Allow controlfields in TransformKohaToMarc
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-08-07 13:08:00 UTC
Size:
1.28 KB
patch
obsolete
>From 5c790225500f9c571050a11982c23f2653e2aff9 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 20 Jul 2017 12:37:56 +0200 >Subject: [PATCH] Bug 10306: Allow controlfields in TransformKohaToMarc >Content-Type: text/plain; charset=utf-8 > >Since the interface allows you to connect a kohafield to a MARC >controlfield, this routine should be able to handle that. Unfortunately >it did not. > >Test plan: >Change will be tested in Biblio/TransformKohaToMarc.t in the next patch. >--- > C4/Biblio.pm | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 11c1d9b..e12246f 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -2178,9 +2178,11 @@ sub TransformKohaToMarc { > my @sfl = @{$tag_hr->{$tag}}; > @sfl = sort { $a->[0] cmp $b->[0]; } @sfl; > @sfl = map { @{$_}; } @sfl; >- $record->insert_fields_ordered( >- MARC::Field->new($tag, " ", " ", @sfl) >- ); >+ # Special care for control fields: remove the subfield indication @ >+ # and do not insert indicators. >+ my @ind = $tag < 10 ? () : ( " ", " " ); >+ @sfl = grep { $_ ne '@' } @sfl if $tag < 10; >+ $record->insert_fields_ordered( MARC::Field->new($tag, @ind, @sfl) ); > } > return $record; > } >-- >2.1.4
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 10306
:
65539
|
65540
|
65541
|
65542
|
65543
|
65544
|
65545
|
65948
|
65949
|
65950
|
65951
|
65952
|
65953
|
66134
|
66135
|
66137
|
66138
|
66139
|
66140
|
66141
|
66142
|
66327
|
66328
|
66329
|
66330
|
66331
|
66332
|
66405
|
66547
|
66548
|
67501
|
67502
|
67503
|
67504
|
67505
|
67506
|
67507
|
68382
|
68766
|
68767
|
68768
|
68769
|
68770
|
68771
|
68772
|
68773