Bugzilla – Attachment 157933 Details for
Bug 34924
Add ability to send 'final auto renewal notice'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34924: (QA follow-up) correctly handle digest data compilation for successful renewal
Bug-34924-QA-follow-up-correctly-handle-digest-dat.patch (text/plain), 3.41 KB, created by
Emily Lamancusa (emlam)
on 2023-10-26 15:02:31 UTC
(
hide
)
Description:
Bug 34924: (QA follow-up) correctly handle digest data compilation for successful renewal
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2023-10-26 15:02:31 UTC
Size:
3.41 KB
patch
obsolete
>From dc4f5debc277c1c7fdffa4bd78c9aea01020d0a3 Mon Sep 17 00:00:00 2001 >From: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Date: Thu, 26 Oct 2023 10:21:09 -0400 >Subject: [PATCH] Bug 34924: (QA follow-up) correctly handle digest data > compilation for successful renewal > >automatic_renewals.pl does some data compilation for digest notices that >depends on the error value returned from attempt_auto_renew. However, on >successful renewal $error is undefined. Add additional checks on value >of $success and definedness of $error to compile data accurately and >avoid warns for undefined variable > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > misc/cronjobs/automatic_renewals.pl | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl >index 72ed54fb31..8661d4f47b 100755 >--- a/misc/cronjobs/automatic_renewals.pl >+++ b/misc/cronjobs/automatic_renewals.pl >@@ -213,16 +213,16 @@ while ( my $auto_renew = $auto_renews->next ) { > if ( $wants_digest ) { > # 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' || $error eq 'auto_too_soon'; >- $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{results}->{$error}++ ; >+ $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{success}++ if $success; >+ $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{error}++ unless $success || $error eq 'auto_too_soon'; >+ $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{results}->{defined $error ? $error : 'auto-renew'}++ ; > 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'; >+ $renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{updated} = 1 if $updated && (!$error || $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' || $error eq 'auto_too_soon'; >- $renew_digest->{ $auto_renew->borrowernumber }->{results}->{$error}++ ; >- $renew_digest->{ $auto_renew->borrowernumber }->{updated} = 1 if $updated && $error ne 'auto_too_soon'; >+ $renew_digest->{ $auto_renew->borrowernumber }->{success} ++ if $success; >+ $renew_digest->{ $auto_renew->borrowernumber }->{error}++ unless $success || $error eq 'auto_too_soon'; >+ $renew_digest->{ $auto_renew->borrowernumber }->{results}->{defined $error ? $error : 'auto-renew'}++ ; >+ $renew_digest->{ $auto_renew->borrowernumber }->{updated} = 1 if $updated && (!$error || $error ne 'auto_too_soon'); > push @{$renew_digest->{ $auto_renew->borrowernumber }->{issues}}, $auto_renew->itemnumber; > } > } >-- >2.34.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 34924
:
156239
|
156240
|
156241
|
157290
|
157291
|
157292
|
157687
|
157688
|
157689
|
157690
|
157895
|
157896
|
157897
|
157898
|
157929
|
157930
|
157931
|
157932
| 157933 |
168642