Bugzilla – Attachment 176371 Details for
Bug 38857
Cronjobs should log their start and command line parameters before processing options
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38857: (QA follow-up) Fix perltidy errors
Bug-38857-QA-follow-up-Fix-perltidy-errors.patch (text/plain), 4.98 KB, created by
Martin Renvoize (ashimema)
on 2025-01-10 16:36:30 UTC
(
hide
)
Description:
Bug 38857: (QA follow-up) Fix perltidy errors
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-01-10 16:36:30 UTC
Size:
4.98 KB
patch
obsolete
>From a00f6cb6a0467c00e6d0bd14891d2cb7820d54fd Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 10 Jan 2025 16:35:44 +0000 >Subject: [PATCH] Bug 38857: (QA follow-up) Fix perltidy errors > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > misc/cronjobs/debar_patrons_with_fines.pl | 6 ++-- > .../restrict_patrons_with_failed_notices.pl | 4 +-- > misc/cronjobs/update_patrons_category.pl | 30 +++++++++---------- > 3 files changed, 20 insertions(+), 20 deletions(-) > >diff --git a/misc/cronjobs/debar_patrons_with_fines.pl b/misc/cronjobs/debar_patrons_with_fines.pl >index e5f7f1bc397..e85f1f77ed2 100755 >--- a/misc/cronjobs/debar_patrons_with_fines.pl >+++ b/misc/cronjobs/debar_patrons_with_fines.pl >@@ -76,8 +76,8 @@ use Koha::Patron::Debarments; > > use C4::Log qw( cronlogaction ); > >-my $command_line_options = join(" ",@ARGV); >-cronlogaction({ info => $command_line_options }); >+my $command_line_options = join( " ", @ARGV ); >+cronlogaction( { info => $command_line_options } ); > > my ( $amount, $help, $confirm, $message, $expiration, $file, $verbose ); > GetOptions( >@@ -128,7 +128,7 @@ my $verb = $confirm ? 'Debarred' : 'Found'; > print "debar_patrons_with_fines: $verb $count_patrons patrons"; > print( $errors ? ", had $errors failures\n" : "\n" ); > >-cronlogaction({ action => 'End', info => "COMPLETED" }); >+cronlogaction( { action => 'End', info => "COMPLETED" } ); > > sub getMessageContent { > return $message if ($message); >diff --git a/misc/cronjobs/restrict_patrons_with_failed_notices.pl b/misc/cronjobs/restrict_patrons_with_failed_notices.pl >index 3aed1c84cbb..86178e1b02a 100755 >--- a/misc/cronjobs/restrict_patrons_with_failed_notices.pl >+++ b/misc/cronjobs/restrict_patrons_with_failed_notices.pl >@@ -28,8 +28,8 @@ use Koha::Patrons; > use C4::Letters; > use Koha::Notice::Message; > >-my $command_line_options = join(" ",@ARGV); >-cronlogaction({ info => $command_line_options }); >+my $command_line_options = join( " ", @ARGV ); >+cronlogaction( { info => $command_line_options } ); > > # Getting options > my ( $help, $verbose, $confirm ); >diff --git a/misc/cronjobs/update_patrons_category.pl b/misc/cronjobs/update_patrons_category.pl >index f9b00a7bb15..ed29265072b 100755 >--- a/misc/cronjobs/update_patrons_category.pl >+++ b/misc/cronjobs/update_patrons_category.pl >@@ -18,9 +18,9 @@ > use Modern::Perl; > > use C4::Context; >-use C4::Log qw(cronlogaction); >+use C4::Log qw(cronlogaction); > use Getopt::Long qw( GetOptions ); >-use Pod::Usage qw( pod2usage ); >+use Pod::Usage qw( pod2usage ); > use Koha::Logger; > use Koha::Patrons; > use Koha::Patron::Categories; >@@ -170,8 +170,8 @@ my $branch_lim; > my %fields; > my @where; > >-my $command_line_options = join(" ",@ARGV); >-cronlogaction({ info => $command_line_options }); >+my $command_line_options = join( " ", @ARGV ); >+cronlogaction( { info => $command_line_options } ); > > GetOptions( > 'help|?' => \$help, >@@ -229,14 +229,14 @@ my $cat_to = Koha::Patron::Categories->find($tocat); > die "Categories not found" unless $cat_from && $cat_to; > > $params{"me.categorycode"} = $fromcat; >-$params{"me.branchcode"} = $branch_lim if $branch_lim; >+$params{"me.branchcode"} = $branch_lim if $branch_lim; > > if ($verbose) { > print "Conditions:\n"; >- print " Registered before $reg_bef\n" if $reg_bef; >- print " Registered after $reg_aft\n" if $reg_aft; >- print " Total fines more than $fine_min\n" if $fine_min; >- print " Total fines less than $fine_max\n" if $fine_max; >+ print " Registered before $reg_bef\n" if $reg_bef; >+ print " Registered after $reg_aft\n" if $reg_aft; >+ print " Total fines more than $fine_min\n" if $fine_min; >+ print " Total fines less than $fine_max\n" if $fine_max; > print " Age below minimum for " . $cat_from->description . "\n" if $ageunder; > print " Age above maximum for " . $cat_from->description . "\n" if $ageover; > if ( defined $branch_lim ) { >@@ -250,7 +250,7 @@ while ( my ( $key, $value ) = each %fields ) { > $params{ "me." . $key } = $value; > } > >-my $where_literal = join ' AND ', @where; >+my $where_literal = join ' AND ', @where; > my $target_patrons = Koha::Patrons->search( \%params ); > $target_patrons = $target_patrons->search( \$where_literal ) if @where; > $target_patrons = $target_patrons->search_patrons_to_update_category( >@@ -271,11 +271,11 @@ if ($verbose) { > while ( my $target_patron = $target_patrons->next() ) { > $target_patron->discard_changes(); > $verbose >- and print $testdisplay >- . "Updated " >- . $target_patron->firstname() . " " >- . $target_patron->surname() >- . " from $fromcat to $tocat\n"; >+ and print $testdisplay >+ . "Updated " >+ . $target_patron->firstname() . " " >+ . $target_patron->surname() >+ . " from $fromcat to $tocat\n"; > } > $target_patrons->reset; > } >-- >2.47.1
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 38857
:
176304
|
176369
|
176370
| 176371