From f81df48ac50767d1ea95acef16b43cbedaf12fb5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 7 Jan 2025 12:34:25 +0000 Subject: [PATCH] Bug 37564:[23.11.x] Prevent bulkmarcimport from generating holds queue jobs We shouldn't need to update the holds queue for such command line imports. --- misc/migration_tools/bulkmarcimport.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 9f1516efe2e..6557e9e0a3b 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -447,7 +447,12 @@ RECORD: while ( ) { $biblioitemnumber = Koha::Biblios->find( $biblionumber )->biblioitem->biblioitemnumber; }; if ($update) { - eval { ModBiblio( $record, $biblionumber, $framework, { overlay_context => { source => 'bulkmarcimport' } } ) }; + eval { + ModBiblio( + $record, $biblionumber, $framework, + { overlay_context => { source => 'bulkmarcimport' }, skip_holds_queue => 1 } + ); + }; if ($@) { warn "ERROR: Edit biblio $biblionumber failed: $@\n"; printlog( { id => $id || $originalid || $biblionumber, op => "update", status => "ERROR" } ) if ($logfile); @@ -528,7 +533,7 @@ RECORD: while ( ) { printlog({id=>$id||$originalid||$biblionumber, op=>"insertitem",status=>"ERROR"}) if ($logfile); # if we failed because of an exception, assume that # the MARC columns in biblioitems were not set. - ModBiblioMarc( $record, $biblionumber ); + ModBiblioMarc( $record, $biblionumber, { skip_holds_queue => 1 }); next RECORD; } else { printlog({id=>$id||$originalid||$biblionumber, op=>"insertitem",status=>"ok"}) if ($logfile); -- 2.47.1