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

(-)a/misc/migration_tools/bulkmarcimport.pl (-5 / +4 lines)
Lines 325-331 my $logger = Koha::Logger->get; Link Here
325
my $schema            = Koha::Database->schema;
325
my $schema            = Koha::Database->schema;
326
my $lint              = MARC::Lint->new;
326
my $lint              = MARC::Lint->new;
327
327
328
329
while () {
328
while () {
330
329
331
    my $record;
330
    my $record;
Lines 376-382 while () { Link Here
376
        SetUTF8Flag($record);
375
        SetUTF8Flag($record);
377
        &$localcust($record) if $localcust;
376
        &$localcust($record) if $localcust;
378
377
379
380
        if ( ( $verbose // 1 ) == 1 ) {    #no dot for verbose==2
378
        if ( ( $verbose // 1 ) == 1 ) {    #no dot for verbose==2
381
            print "." . ( $record_number % 100 == 0 ? "\n$record_number" : '' );
379
            print "." . ( $record_number % 100 == 0 ? "\n$record_number" : '' );
382
        }
380
        }
Lines 596-602 while () { Link Here
596
                } elsif ($insert) {
594
                } elsif ($insert) {
597
                    my $record_clone = $record->clone();
595
                    my $record_clone = $record->clone();
598
                    C4::Biblio::_strip_item_fields($record_clone);
596
                    C4::Biblio::_strip_item_fields($record_clone);
599
                    eval { ( $record_id, $biblioitemnumber ) = AddBiblio( $record_clone, $framework, $add_biblio_options ) };
597
                    eval {
598
                        ( $record_id, $biblioitemnumber ) = AddBiblio( $record_clone, $framework, $add_biblio_options );
599
                    };
600
                    if ($@) {
600
                    if ($@) {
601
                        warn "ERROR: Insert biblio $originalid failed: $@\n";
601
                        warn "ERROR: Insert biblio $originalid failed: $@\n";
602
                        printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile);
602
                        printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile);
Lines 715-721 while () { Link Here
715
        $records_exhausted = 1;
715
        $records_exhausted = 1;
716
    }
716
    }
717
717
718
    if ( $record_number % $commitnum == 0 || $record_number == $number || $records_exhausted ) {
718
    if ( !$test_parameter && $record_number % $commitnum == 0 || $record_number == $number || $records_exhausted ) {
719
        if ($indexer) {
719
        if ($indexer) {
720
            $indexer->update_index( \@search_engine_record_ids, \@search_engine_records ) unless $skip_indexing;
720
            $indexer->update_index( \@search_engine_record_ids, \@search_engine_records ) unless $skip_indexing;
721
            if ( C4::Context->preference('AutoLinkBiblios') ) {
721
            if ( C4::Context->preference('AutoLinkBiblios') ) {
722
- 

Return to bug 37020