From c41fab2292da13f4bf7cac0110216c4f8e4721d7 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 20 May 2022 08:08:28 +0100 Subject: [PATCH] Bug 30755: Remove auto_too_soon from error count This patch prevents auto_too_soon errors being counted towards auto renew errors. Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- misc/cronjobs/automatic_renewals.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl index 4d9ff5cdd0..288940ed23 100755 --- a/misc/cronjobs/automatic_renewals.pl +++ b/misc/cronjobs/automatic_renewals.pl @@ -209,12 +209,12 @@ while ( my $auto_renew = $auto_renews->next ) { # cache this one to process after we've run through all of the items. if ($digest_per_branch) { $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{success}++ if $error eq 'auto_renew'; - $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{error}++ unless $error eq 'auto_renew'; + $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{error}++ unless $error eq 'auto_renew' || $error eq 'auto_too_soon'; push @{$renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{issues}}, $auto_renew->itemnumber; $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{updated} = 1 if $updated && $error ne 'auto_too_soon'; } else { $renew_digest->{ $auto_renew->borrowernumber }->{success} ++ if $error eq 'auto_renew'; - $renew_digest->{ $auto_renew->borrowernumber }->{error}++ unless $error eq 'auto_renew'; + $renew_digest->{ $auto_renew->borrowernumber }->{error}++ unless $error eq 'auto_renew' || $error eq 'auto_too_soon'; $renew_digest->{ $auto_renew->borrowernumber }->{updated} = 1 if $updated && $error ne 'auto_too_soon'; push @{$renew_digest->{ $auto_renew->borrowernumber }->{issues}}, $auto_renew->itemnumber; } -- 2.39.5