Bugzilla – Attachment 91874 Details for
Bug 23395
batch operations on biblios/items should be able to pass a list of plugins
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23395: Fetch the plugins only once in bulkmarcimport.pl
Bug-23395-Fetch-the-plugins-only-once-in-bulkmarci.patch (text/plain), 2.10 KB, created by
Tomás Cohen Arazi (tcohen)
on 2019-07-30 13:47:01 UTC
(
hide
)
Description:
Bug 23395: Fetch the plugins only once in bulkmarcimport.pl
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2019-07-30 13:47:01 UTC
Size:
2.10 KB
patch
obsolete
>From c9e77d2905704941f60bafa6b99c20be9cc860a0 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 30 Jul 2019 10:46:33 -0300 >Subject: [PATCH] Bug 23395: Fetch the plugins only once in bulkmarcimport.pl > >--- > misc/migration_tools/bulkmarcimport.pl | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index bc438aac38..8782e8b328 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -264,6 +264,10 @@ my $searcher = Koha::SearchEngine::Search->new( > } > ); > >+# FIXME: maybe we should group plugins related to biblio/item changes and >+# fetch them all together. >+my $plugins = Koha::Plugins->new->GetPlugins(); >+ > RECORD: while ( ) { > my $record; > # get records >@@ -458,7 +462,7 @@ RECORD: while ( ) { > $biblioitemnumber = Koha::Biblios->find( $biblionumber )->biblioitem->biblioitemnumber; > }; > if ($update) { >- eval { ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber) ) }; >+ eval { ModBiblio( $record, $biblionumber, GetFrameworkCode($biblionumber), undef, $plugins ) }; > if ($@) { > warn "ERROR: Edit biblio $biblionumber failed: $@\n"; > printlog( { id => $id || $originalid || $biblionumber, op => "update", status => "ERROR" } ) if ($logfile); >@@ -471,7 +475,7 @@ RECORD: while ( ) { > } > } else { > if ($insert) { >- eval { ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '', { defer_marc_save => 1 } ) }; >+ eval { ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '', { defer_marc_save => 1, plugins => $plugins } ) }; > if ($@) { > warn "ERROR: Adding biblio $biblionumber failed: $@\n"; > printlog( { id => $id || $originalid || $biblionumber, op => "insert", status => "ERROR" } ) if ($logfile); >-- >2.22.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23395
:
91870
|
91871
|
91872
| 91874