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

(-)a/misc/migration_tools/bulkmarcimport.pl (-2 / +9 lines)
Lines 468-474 RECORD: while ( ) { Link Here
468
                }
468
                }
469
            } else {
469
            } else {
470
                if ($insert) {
470
                if ($insert) {
471
                    eval { ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '') };
471
                    my $record_clone = $record->clone();
472
                    my $_framework = '';
473
                    C4::Biblio::_strip_item_fields($record_clone, $_framework );
474
                    eval { ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record_clone, $_framework ) };
475
                    # If incoming record has bib ids set we need to transfer
476
                    # new ids from record_clone to incoming record to avoid
477
                    # working on wrong record (the original record) later on
478
                    # when adding items for example
479
                    C4::Biblio::_koha_marc_update_bib_ids($record, $_framework, $biblionumber, $biblioitemnumber);
472
                    if ($@) {
480
                    if ($@) {
473
                        warn "ERROR: Adding biblio $biblionumber failed: $@\n";
481
                        warn "ERROR: Adding biblio $biblionumber failed: $@\n";
474
                        printlog( { id => $id || $originalid || $biblionumber, op => "insert", status => "ERROR" } ) if ($logfile);
482
                        printlog( { id => $id || $originalid || $biblionumber, op => "insert", status => "ERROR" } ) if ($logfile);
475
- 

Return to bug 25539