Bugzilla – Attachment 169959 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.66 KB, created by
Nick Clemens (kidclamp)
on 2024-08-01 18:08:25 UTC
(
hide
)
Description:
Bug 37550: Move item check after error handling
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-08-01 18:08:25 UTC
Size:
1.66 KB
patch
obsolete
>From 89eeef9fe66e92b46c91b4e75bce6b6cadc3949c 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 >--- > 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 8161a0bb0ad..9c1f144af34 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -597,7 +597,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"; >@@ -607,6 +606,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