Bugzilla – Attachment 60552 Details for
Bug 18153
UNIMARC bib records exported with invalid 'a' char in label pos.9
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18153 : fix unimarc label in export tool
Bug-18153--fix-unimarc-label-in-export-tool.patch (text/plain), 1.28 KB, created by
Stéphane Delaune
on 2017-02-22 11:54:54 UTC
(
hide
)
Description:
Bug 18153 : fix unimarc label in export tool
Filename:
MIME Type:
Creator:
Stéphane Delaune
Created:
2017-02-22 11:54:54 UTC
Size:
1.28 KB
patch
obsolete
>From e7cb021fbab640868ae8963fbbb69e3e66931bb0 Mon Sep 17 00:00:00 2001 >From: Koha User <support@biblibre.com> >Date: Wed, 22 Feb 2017 12:53:17 +0100 >Subject: [PATCH] Bug 18153 : fix unimarc label in export tool > >The standard UNIMARC requires than the 9th character (starting from 0) in >labels must be blank (while it may be 'a' in marc21), but under certain >conditions (e.g. when a iso2709 file is imported) Koha's unimarc records can >have an invalid char. 'a' in label pos.9 > >So when we want to export them with export's tool, if marcflavour syspref is >UNIMARC, we need to delete this bad 'a' char from label pos.9 (to have blank) : >this patch make this >--- > Koha/Exporter/Record.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/Exporter/Record.pm b/Koha/Exporter/Record.pm >index aa805e2..d8bb7b4 100644 >--- a/Koha/Exporter/Record.pm >+++ b/Koha/Exporter/Record.pm >@@ -123,6 +123,9 @@ sub export { > Koha::Logger->get->info( $msg ); > next; > } >+ my $leader = $record->leader(); >+ my $marcflavour = C4::Context->preference("marcflavour"); >+ if ($marcflavour eq 'UNIMARC'){substr($leader,9,1) = ' ';$record->leader($leader);} > print $record->as_usmarc(); > } > } elsif ( $format eq 'xml' ) { >-- >2.7.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 18153
:
60552
|
60553
|
62244
|
62245
|
63009
|
68532