Bugzilla – Attachment 188387 Details for
Bug 41052
marc_ordering_process.pl should take options for specific accounts and/or directories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41052: Add option to specify one or more accounts for marc_ordering_process.pl
Bug-41052-Add-option-to-specify-one-or-more-accoun.patch (text/plain), 2.29 KB, created by
Kyle M Hall (khall)
on 2025-10-23 17:57:00 UTC
(
hide
)
Description:
Bug 41052: Add option to specify one or more accounts for marc_ordering_process.pl
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2025-10-23 17:57:00 UTC
Size:
2.29 KB
patch
obsolete
>From cb1e3f55c3497f778484763e19da04f2d6d25bcd Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 23 Oct 2025 13:54:24 -0400 >Subject: [PATCH] Bug 41052: Add option to specify one or more accounts for > marc_ordering_process.pl > >For debugging it would be helpful to be able to specify to run only for a single account or file/directory > >Test Plan: >1) Create 3 marc order accounts >2) Run script with no options >2) Script should process all 3 marc order accounts >3) Run script with one -a parameter for one account id >4) Script should run for only that account >5) Run script with two -a parameters for two account ids >6) Script should run for only those two accounts >--- > misc/cronjobs/marc_ordering_process.pl | 23 ++++++++++++++++------- > 1 file changed, 16 insertions(+), 7 deletions(-) > >diff --git a/misc/cronjobs/marc_ordering_process.pl b/misc/cronjobs/marc_ordering_process.pl >index 0e51cf7baf3..5ca06ae1545 100755 >--- a/misc/cronjobs/marc_ordering_process.pl >+++ b/misc/cronjobs/marc_ordering_process.pl >@@ -68,12 +68,13 @@ use C4::Log qw( cronlogaction ); > my $command_line_options = join( " ", @ARGV ); > cronlogaction( { info => $command_line_options } ); > >-my ( $help, $verbose, $confirm, $delete ); >+my ( $help, $verbose, $confirm, $delete, @marc_order_account_ids ); > GetOptions( >- 'h|help' => \$help, >- 'v|verbose' => \$verbose, >- 'c|confirm' => \$confirm, >- 'd|delete' => \$delete, >+ 'h|help' => \$help, >+ 'v|verbose' => \$verbose, >+ 'c|confirm' => \$confirm, >+ 'd|delete' => \$delete, >+ 'a|marc-order-account=i' => \@marc_order_account_ids, > ) || pod2usage(1); > > pod2usage(0) if $help; >@@ -81,9 +82,17 @@ pod2usage(0) if $help; > $verbose = 1 unless $verbose or $confirm; > print "Test run only\n" unless $confirm; > >-print "Fetching MARC ordering accounts\n" if $verbose; >+if ($verbose) { >+ print "Fetching MARC ordering accounts"; >+ print " " . join( ", ", @marc_order_account_ids ) if @marc_order_account_ids; >+ print "\n"; >+} >+ >+my $params = {}; >+$params = { id => { '-in' => \@marc_order_account_ids } } if @marc_order_account_ids; >+ > my @accounts = Koha::MarcOrderAccounts->search( >- {}, >+ $params, > { join => [ 'vendor', 'budget' ] } > )->as_list; > >-- >2.50.1 (Apple Git-155)
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 41052
: 188387