Bugzilla – Attachment 39366 Details for
Bug 14245
RIS in unimarc flavour is still deficient
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14245: Problems with RIS export in unimarc
Bug-14245-Problems-with-RIS-export-in-unimarc.patch (text/plain), 2.12 KB, created by
Bernardo Gonzalez Kriegel
on 2015-05-21 17:16:20 UTC
(
hide
)
Description:
Bug 14245: Problems with RIS export in unimarc
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-05-21 17:16:20 UTC
Size:
2.12 KB
patch
obsolete
>From 4a95e7798ce37d8538d95ab400e7b33b44beca09 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Thu, 21 May 2015 14:00:05 -0300 >Subject: [PATCH] Bug 14245: Problems with RIS export in unimarc > >Variable $itype is used an all C4/Ris.pm to switch >between marc falvors, but is local and not passed along >as argument. > >As a quick solution, is defined as global > >To test: >1) On UNIMARC setup, export a record as RIS, >check that author (and other fields) are displayed >incorrectly > >2) Apply the patch > >3) Export again, improved results > >4) Run t/Ris.t > >There are other problems in this script, needs maintenance >(e.g. no Modern::Perl friendly) >--- > C4/Ris.pm | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/Ris.pm b/C4/Ris.pm >index 0727bf9..7f2f328 100644 >--- a/C4/Ris.pm >+++ b/C4/Ris.pm >@@ -65,6 +65,7 @@ package C4::Ris; > use List::MoreUtils qw/uniq/; > use vars qw($VERSION @ISA @EXPORT); > >+ > # set the version for version checking > $VERSION = 3.07.00.049; > >@@ -87,12 +88,14 @@ C<$record> - a MARC::Record object > > =cut > >+my $intype; >+ > sub marc2ris { > my ($record) = @_; > my $output; > > my $marcflavour = C4::Context->preference("marcflavour"); >- my $intype = lc($marcflavour); >+ $intype = lc($marcflavour); > my $marcprint = 0; # Debug flag; > > # Let's redirect stdout >@@ -409,7 +412,7 @@ sub normalize_author { > > ## we currently ignore subfield c until someone complains > if (length($rawauthorb) > 0) { >- return join ",", ($rawauthora, $rawauthorb); >+ return join ", ", ($rawauthora, $rawauthorb); > } > else { > return $rawauthora; >@@ -448,7 +451,7 @@ sub get_author { > normalize_author($authorname, $authorfield->subfield('b'), $authorfield->subfield('c'), $authorfield->indicator("$indicator")); > } > else { >- normalize_author($authorfield->subfield('a'), $authorfield->subfield('b'), $authorfield->subfield('c'), $authorfield->indicator("$indicator")); >+ normalize_author($authorfield->subfield('a') // '', $authorfield->subfield('b') // '', $authorfield->subfield('c') // '', $authorfield->indicator("$indicator")); > } > } > >-- >1.7.9.5
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 14245
:
39360
|
39366
|
42572
|
42586
|
42608