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

(-)a/misc/migration_tools/bulkmarcimport.pl (-3 / +6 lines)
Lines 264-269 my $searcher = Koha::SearchEngine::Search->new( Link Here
264
    }
264
    }
265
);
265
);
266
266
267
# FIXME: maybe we should group plugins related to biblio/item changes and
268
# fetch them all together.
269
my $plugins = Koha::Plugins->new->GetPlugins();
270
267
RECORD: while (  ) {
271
RECORD: while (  ) {
268
    my $record;
272
    my $record;
269
    # get records
273
    # get records
Lines 458-464 RECORD: while ( ) { Link Here
458
                    $biblioitemnumber = Koha::Biblios->find( $biblionumber )->biblioitem->biblioitemnumber;
462
                    $biblioitemnumber = Koha::Biblios->find( $biblionumber )->biblioitem->biblioitemnumber;
459
                };
463
                };
460
                if ($update) {
464
                if ($update) {
461
                    eval { ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber) ) };
465
                    eval { ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber), undef, $plugins ) };
462
                    if ($@) {
466
                    if ($@) {
463
                        warn "ERROR: Edit biblio $biblionumber failed: $@\n";
467
                        warn "ERROR: Edit biblio $biblionumber failed: $@\n";
464
                        printlog( { id => $id || $originalid || $biblionumber, op => "update", status => "ERROR" } ) if ($logfile);
468
                        printlog( { id => $id || $originalid || $biblionumber, op => "update", status => "ERROR" } ) if ($logfile);
Lines 471-477 RECORD: while ( ) { Link Here
471
                }
475
                }
472
            } else {
476
            } else {
473
                if ($insert) {
477
                if ($insert) {
474
                    eval { ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '', { defer_marc_save => 1 } ) };
478
                    eval { ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '', { defer_marc_save => 1, plugins => $plugins } ) };
475
                    if ($@) {
479
                    if ($@) {
476
                        warn "ERROR: Adding biblio $biblionumber failed: $@\n";
480
                        warn "ERROR: Adding biblio $biblionumber failed: $@\n";
477
                        printlog( { id => $id || $originalid || $biblionumber, op => "insert", status => "ERROR" } ) if ($logfile);
481
                        printlog( { id => $id || $originalid || $biblionumber, op => "insert", status => "ERROR" } ) if ($logfile);
478
- 

Return to bug 23395