Bug 31249: Use cronlogaction on update_patrons_category.pl

This patch does what the title says.

To test:
1. Run the script
2. Check the action logs
=> FAIL: Boo, no record of the running cronjob
3. Apply this patch
4. Repeat 1-2
=> SUCCESS: Yay!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <liz@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2022-07-27 20:46:03 -03:00
parent 92f5e02a8c
commit e4d2ef0f46
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -18,6 +18,7 @@
use Modern::Perl; use Modern::Perl;
use C4::Context; use C4::Context;
use C4::Log qw(cronlogaction);
use Getopt::Long qw( GetOptions ); use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage ); use Pod::Usage qw( pod2usage );
use Koha::Logger; use Koha::Logger;
@ -201,6 +202,8 @@ if ( not $fromcat && $tocat ) { #make sure we've specified the info we need.
$verbose and print "Will update patrons from $fromcat to $tocat with conditions below (if any)\n"; $verbose and print "Will update patrons from $fromcat to $tocat with conditions below (if any)\n";
cronlogaction();
my %params; my %params;
if ( $reg_bef || $reg_aft ) { if ( $reg_bef || $reg_aft ) {