https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32332
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com, | |martin.renvoize@ptfs-europe | |.com, | |[email protected] --- Comment #3 from Jonathan Druart <[email protected]> --- I am not familiar with this script, but I am wondering: should not we skip to the next record way before we reach those lines? Maybe we need a "next" in the "search for a match" block? iff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index d2dfe1ad56a..45a7c94e39c 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -349,6 +349,7 @@ RECORD: while ( ) { next; } } + next if $insert; } elsif ( $results && scalar(@$results) > 1 ) { $logger->debug("more than one match for $query"); } else { But not knowing much this script it's hard to tell if it won't introduce regressions. Or, another option, more inline with your diagnostic, could be to diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index d2dfe1ad56a..e95b1fa199e 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -480,7 +480,7 @@ RECORD: while ( ) { C4::Biblio::_strip_item_fields($clone_record, ''); # This sets the marc fields if there was an error, and also calls # defer_marc_save. - ModBiblioMarc( $clone_record, $biblionumber ); + ModBiblioMarc( $clone_record, $biblionumber ) if $insert; if ( $error_adding ) { warn "ERROR: Adding items to bib $biblionumber failed: $error_adding"; printlog({id=>$id||$originalid||$biblionumber, op=>"insertitem",status=>"ERROR"}) if ($logfile); -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
