Bugzilla – Attachment 77155 Details for
Bug 20811
Fix wrong usage of ModBiblio in bulkmarcimport.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20811: (QA follow-up) Make the isbn check work
Bug-20811-QA-follow-up-Make-the-isbn-check-work.patch (text/plain), 1.65 KB, created by
Marcel de Rooy
on 2018-07-20 09:57:22 UTC
(
hide
)
Description:
Bug 20811: (QA follow-up) Make the isbn check work
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-07-20 09:57:22 UTC
Size:
1.65 KB
patch
obsolete
>From 7a213d2c7e51e3e14101b8b1ec589835f0d80ad1 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 20 Jul 2018 11:21:11 +0200 >Subject: [PATCH] Bug 20811: (QA follow-up) Make the isbn check work >Content-Type: text/plain; charset=utf-8 > >The following code was never reached, since $isbn was not filled. > if (!$biblionumber && $isbn_check && $isbn) { > $sth_isbn->execute($isbn); > ($biblionumber,$biblioitemnumber) = $sth_isbn->fetchrow; > } >Solution: Fix the code with two $isbn declarations. Move the checkisbn >condition a level deeper. > >Test plan: >Run misc/migration_tools/bulkmarcimport.pl -file bib726.utf8 --update -isbn >Since you do not match on biblionumber, the ISBN should match. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/migration_tools/bulkmarcimport.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 46c5017..765f03a 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -296,11 +296,11 @@ RECORD: while ( ) { > &$localcust($record) if $localcust; > my $isbn; > # remove trailing - in isbn (only for biblios, of course) >- if ($biblios && $cleanisbn) { >+ if( $biblios ) { > my $tag = $marcFlavour eq 'UNIMARC' ? '010' : '020'; > my $field = $record->field($tag); >- my $isbn = $field && $field->subfield('a'); >- if ( $isbn ) { >+ $isbn = $field && $field->subfield('a'); >+ if ( $isbn && $cleanisbn ) { > $isbn =~ s/-//g; > $field->update('a' => $isbn); > } >-- >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 20811
:
75599
|
76861
|
76885
|
76886
|
76887
|
76888
|
76969
|
77154
| 77155 |
77156