Bugzilla – Attachment 66328 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]
[SIGNED-OFF] Bug 10306: Allow controlfields in TransformKohaToMarc
SIGNED-OFF-Bug-10306-Allow-controlfields-in-Transf.patch (text/plain), 1.31 KB, created by
Josef Moravec
on 2017-08-22 12:51:57 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 10306: Allow controlfields in TransformKohaToMarc
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-08-22 12:51:57 UTC
Size:
1.31 KB
patch
obsolete
>From 22f2fb796b63d2c5b180a2a6eb4060f14a4c15a1 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] [SIGNED-OFF] Bug 10306: Allow controlfields in > TransformKohaToMarc > >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. > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > 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