@@ -, +, @@ You can export part of your catalog to generate one --- C4/ImportBatch.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) --- a/C4/ImportBatch.pm +++ a/C4/ImportBatch.pm @@ -34,6 +34,7 @@ use C4::Items qw( AddItemFromMarc ModItemFromMarc ); use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars ); use C4::AuthoritiesMarc qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading ); use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate ); +use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue; use Koha::Items; use Koha::SearchEngine; use Koha::SearchEngine::Indexer; @@ -662,7 +663,8 @@ sub BatchCommitRecords { $overlay_framework // $oldbiblio->frameworkcode, { overlay_context => $context, - skip_record_index => 1 + skip_record_index => 1, + skip_holds_queue => 1, } ); push @biblio_ids, $recordid; @@ -717,9 +719,12 @@ sub BatchCommitRecords { # final commit should be before Elastic background indexing in order to find job data $schema->txn_commit; - if ( @biblio_ids ) { - my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); + if (@biblio_ids) { + my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); $indexer->index_records( \@biblio_ids, "specialUpdate", "biblioserver" ); + + Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( { biblio_ids => [$biblionumber] } ) + if C4::Context->preference('RealTimeHoldsQueue'); } return ($num_added, $num_updated, $num_items_added, $num_items_replaced, $num_items_errored, $num_ignored); --