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

(-)a/misc/migration_tools/bulkmarcimport.pl (-5 / +4 lines)
Lines 124-130 if ($all) { Link Here
124
}
124
}
125
125
126
my $using_elastic_search = (C4::Context->preference('SearchEngine') eq 'Elasticsearch');
126
my $using_elastic_search = (C4::Context->preference('SearchEngine') eq 'Elasticsearch');
127
my $modify_biblio_marc_options = {
127
my $mod_biblio_options = {
128
    disable_autolink => $using_elastic_search,
128
    disable_autolink => $using_elastic_search,
129
    defer_search_engine_indexing => $using_elastic_search,
129
    defer_search_engine_indexing => $using_elastic_search,
130
    overlay_context => { source => 'bulkmarcimport' }
130
    overlay_context => { source => 'bulkmarcimport' }
Lines 520-526 RECORD: foreach my $record (@{$marc_records}) { Link Here
520
                };
520
                };
521
                if ($update) {
521
                if ($update) {
522
                    my $success;
522
                    my $success;
523
                    eval { $success = ModBiblio($record, $matched_record_id, GetFrameworkCode($matched_record_id), $modify_biblio_marc_options) };
523
                    eval { $success = ModBiblio($record, $matched_record_id, GetFrameworkCode($matched_record_id), $mod_biblio_options) };
524
                    if ($@) {
524
                    if ($@) {
525
                        warn "ERROR: Update biblio $matched_record_id failed: $@\n";
525
                        warn "ERROR: Update biblio $matched_record_id failed: $@\n";
526
                        printlog( { id => $matched_record_id, op => "update", status => "ERROR" } ) if ($logfile);
526
                        printlog( { id => $matched_record_id, op => "update", status => "ERROR" } ) if ($logfile);
Lines 570-576 RECORD: foreach my $record (@{$marc_records}) { Link Here
570
                C4::Biblio::_strip_item_fields($clone_record, $framework);
570
                C4::Biblio::_strip_item_fields($clone_record, $framework);
571
                # This sets the marc fields if there was an error, and also calls
571
                # This sets the marc fields if there was an error, and also calls
572
                # defer_marc_save.
572
                # defer_marc_save.
573
                ModBiblioMarc($clone_record, $record_id, $modify_biblio_marc_options);
573
                ModBiblioMarc($clone_record, $record_id, $mod_biblio_options);
574
                if ($error_adding) {
574
                if ($error_adding) {
575
                    warn "ERROR: Adding items to bib $record_id failed: $error_adding";
575
                    warn "ERROR: Adding items to bib $record_id failed: $error_adding";
576
                    printlog({ id => $record_id, op => "insert items", status => "ERROR"}) if ($logfile);
576
                    printlog({ id => $record_id, op => "insert items", status => "ERROR"}) if ($logfile);
Lines 621-627 RECORD: foreach my $record (@{$marc_records}) { Link Here
621
621
622
                        # @FIXME: Why do we save here without stripping items? Besides,
622
                        # @FIXME: Why do we save here without stripping items? Besides,
623
                        # save with stripped items has already been performed
623
                        # save with stripped items has already been performed
624
                        ModBiblioMarc($record, $record_id, $modify_biblio_marc_options);
624
                        ModBiblioMarc($record, $record_id, $mod_biblio_options);
625
                        next RECORD;
625
                        next RECORD;
626
                    }
626
                    }
627
                    else {
627
                    else {
628
- 

Return to bug 29440