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

(-)a/misc/migration_tools/bulkmarcimport.pl (-2 / +8 lines)
Lines 548-554 RECORD: foreach my $record (@{$marc_records}) { Link Here
548
                }
548
                }
549
            }
549
            }
550
            elsif ($insert) {
550
            elsif ($insert) {
551
                eval { ($record_id, $biblioitemnumber) = AddBiblio($record, $framework) };
551
                my $record_clone = $record->clone();
552
                C4::Biblio::_strip_item_fields($record_clone);
553
                eval { ($record_id, $biblioitemnumber) = AddBiblio($record_clone, $framework) };
554
                # If incoming record has bib ids set we need to transfer
555
                # new ids from record_clone to incoming record to avoid
556
                # working on wrong record (the original record) later on
557
                # when adding items for example
558
                C4::Biblio::_koha_marc_update_bib_ids($record, $framework, $biblionumber, $biblioitemnumber);
552
                if ($@) {
559
                if ($@) {
553
                    warn "ERROR: Insert biblio $originalid failed: $@\n";
560
                    warn "ERROR: Insert biblio $originalid failed: $@\n";
554
                    printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile);
561
                    printlog( { id => $originalid, op => "insert", status => "ERROR" } ) if ($logfile);
555
- 

Return to bug 25539