View | Details | Raw Unified | Return to bug 34822
Collapse All | Expand All

(-)a/C4/ImportBatch.pm (-4 / +8 lines)
Lines 34-39 use C4::Items qw( AddItemFromMarc ModItemFromMarc ); Link Here
34
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
34
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
35
use C4::AuthoritiesMarc qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading );
35
use C4::AuthoritiesMarc qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading );
36
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
36
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
37
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
37
use Koha::Items;
38
use Koha::Items;
38
use Koha::SearchEngine;
39
use Koha::SearchEngine;
39
use Koha::SearchEngine::Indexer;
40
use Koha::SearchEngine::Indexer;
Lines 662-668 sub BatchCommitRecords { Link Here
662
                    $overlay_framework // $oldbiblio->frameworkcode,
663
                    $overlay_framework // $oldbiblio->frameworkcode,
663
                    {
664
                    {
664
                        overlay_context   => $context,
665
                        overlay_context   => $context,
665
                        skip_record_index => 1
666
                        skip_record_index => 1,
667
                        skip_holds_queue  => 1,
666
                    }
668
                    }
667
                );
669
                );
668
                push @biblio_ids, $recordid;
670
                push @biblio_ids, $recordid;
Lines 717-725 sub BatchCommitRecords { Link Here
717
    # final commit should be before Elastic background indexing in order to find job data
719
    # final commit should be before Elastic background indexing in order to find job data
718
    $schema->txn_commit;
720
    $schema->txn_commit;
719
721
720
    if ( @biblio_ids ) {
722
    if (@biblio_ids) {
721
        my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX });
723
        my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } );
722
        $indexer->index_records( \@biblio_ids, "specialUpdate", "biblioserver" );
724
        $indexer->index_records( \@biblio_ids, "specialUpdate", "biblioserver" );
725
726
        Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( { biblio_ids => [$biblionumber] } )
727
            if C4::Context->preference('RealTimeHoldsQueue');
723
    }
728
    }
724
729
725
    return ($num_added, $num_updated, $num_items_added, $num_items_replaced, $num_items_errored, $num_ignored);
730
    return ($num_added, $num_updated, $num_items_added, $num_items_replaced, $num_items_errored, $num_ignored);
726
- 

Return to bug 34822