Bugzilla – Attachment 173868 Details for
Bug 37550
bulkmarcimport.pl dies when adding items throws an exception
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37550: Move item check after error handling
Bug-37550-Move-item-check-after-error-handling.patch (text/plain), 1.76 KB, created by
Kyle M Hall (khall)
on 2024-11-01 12:18:43 UTC
(
hide
)
Description:
Bug 37550: Move item check after error handling
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-11-01 12:18:43 UTC
Size:
1.76 KB
patch
obsolete
>From e0ad1a2a6756bc10c7b47d13f1d1294f7fb63762 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 1 Aug 2024 17:37:35 +0000 >Subject: [PATCH] Bug 37550: Move item check after error handling > >To test: >1 - Grab the sample file on this bug report >2 - perl misc/migration_tools/bulkmarcimport.pl -b --file=spaceditems.pl -v >3 - An exception for 'Duplicate ID' is thrown and script dies >4 - Apply patch >5 - run script again >6 - The script finishes, no items are added, but record is > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > misc/migration_tools/bulkmarcimport.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index efcac9589f4..4a8cb041b9b 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -613,7 +613,6 @@ RECORD: foreach my $record ( @{$marc_records} ) { > AddItemBatchFromMarc( $record, $record_id, $biblioitemnumber, $framework ); > }; > my $error_adding = $@; >- $record_has_added_items = @{$itemnumbers_ref}; > > if ($error_adding) { > warn "ERROR: Adding items to bib $record_id failed: $error_adding"; >@@ -623,6 +622,9 @@ RECORD: foreach my $record ( @{$marc_records} ) { > # the MARC columns in biblioitems were not set. > next RECORD; > } >+ >+ $record_has_added_items = @{$itemnumbers_ref}; >+ > if ( $dedup_barcode && grep { exists $_->{error_code} && $_->{error_code} eq 'duplicate_barcode' } > @$errors_ref ) > { >-- >2.39.2
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 37550
:
169959
|
169960
|
169961
|
170630
|
170648
|
170649
|
170650
| 173868 |
173869
|
173870