Bugzilla – Attachment 77156 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) Prevent calling AddItemBatchFromMarc and ModBiblioMarc without biblionumber
Bug-20811-QA-follow-up-Prevent-calling-AddItemBatc.patch (text/plain), 2.09 KB, created by
Marcel de Rooy
on 2018-07-20 09:57:26 UTC
(
hide
)
Description:
Bug 20811: (QA follow-up) Prevent calling AddItemBatchFromMarc and ModBiblioMarc without biblionumber
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-07-20 09:57:26 UTC
Size:
2.09 KB
patch
obsolete
>From f1e5b9ae1932df9417fc6022323081060ac766a5 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 20 Jul 2018 11:46:58 +0200 >Subject: [PATCH] Bug 20811: (QA follow-up) Prevent calling > AddItemBatchFromMarc and ModBiblioMarc without biblionumber >Content-Type: text/plain; charset=utf-8 > >If you use -update but do not find matches (or did not want to match), you >should not call those routines. We should warn and skip this record. > >Adding a warn at the start that the choice of options may not be smart. >Note that this needs further attention somewhere else. You could mix >-update with -insert for instance and still see some problems. (May depend >on items with unique barcode etc.) > >Test plan: >Run -update without match or isbn. >Or run -update -isbn with a non-matching ISBN. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/migration_tools/bulkmarcimport.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index 765f03a..281e3c6 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -100,6 +100,9 @@ if ($version || ($input_marc_file eq '')) { > pod2usage( -verbose => 2 ); > exit; > } >+if( $update && ( !$match || $isbn_check ) ) { >+ warn "Using -update without -match or -isbn seems to be useless.\n"; >+} > > if(defined $localcust) { #local customize module > if(!-e $localcust) { >@@ -473,7 +476,9 @@ RECORD: while ( ) { > printlog( { id => $id || $originalid || $biblionumber, op => "insert", status => "ok" } ) if ($logfile); > } > } else { >+ warn "WARNING: Updating record ".($id||$originalid)." failed"; > printlog( { id => $id || $originalid || $biblionumber, op => "update", status => "warning : not in database" } ) if ($logfile); >+ next RECORD; > } > } > eval { ( $itemnumbers_ref, $errors_ref ) = AddItemBatchFromMarc( $record, $biblionumber, $biblioitemnumber, '' ); }; >-- >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