Bugzilla – Attachment 104883 Details for
Bug 18532
Messaging preferences for auto renewals
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18532: (follow-up) UNTESTED add individual issues to digest notice
Bug-18532-follow-up-UNTESTED-add-individual-issues.patch (text/plain), 3.32 KB, created by
Nick Clemens (kidclamp)
on 2020-05-14 13:23:13 UTC
(
hide
)
Description:
Bug 18532: (follow-up) UNTESTED add individual issues to digest notice
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-05-14 13:23:13 UTC
Size:
3.32 KB
patch
obsolete
>From 0af0e6dc5f18c262c02cbd4914786c74f3cbe93d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 14 May 2020 13:21:22 +0000 >Subject: [PATCH] Bug 18532: (follow-up) UNTESTED add individual issues to > digest notice > >This is how I think this works, I did not test this code >--- > installer/data/mysql/atomicupdate/bug-18532.perl | 15 +++++++++++---- > misc/cronjobs/automatic_renewals.pl | 3 +++ > 2 files changed, 14 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug-18532.perl b/installer/data/mysql/atomicupdate/bug-18532.perl >index 4bb601dd6e..5775863372 100644 >--- a/installer/data/mysql/atomicupdate/bug-18532.perl >+++ b/installer/data/mysql/atomicupdate/bug-18532.perl >@@ -4,11 +4,18 @@ if( CheckVersion( $DBversion ) ) { > $dbh->do( qq{ > INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('circulation', 'AUTO_RENEWALS_DGST', 'notification on auto renewing', 'Auto renewals (Digest)', > "Dear [% borrower.firstname %] [% borrower.surname %], >- [% IF checkout.auto_renew_errors %] >- There were [% checkout.auto_renew_errors %] items that where not correctly renewed. >+ [% IF error %] >+ There were [% error %] items that were not correctly renewed. > [% END %] >- [% IF checkout.auto_renew %] >- There were [% checkout.auto_renew %] items that where correctly renewed. >+ [% IF success %] >+ There were [% success %] items that where correctly renewed. >+ [% END %] >+ [% FOREACH issue IN issues %] >+ [% issue.item.biblio.title %] : [% issue.item.barcode %] >+ [% IF issue.auto_renew_error IS NULL %] >+ was renewed until [% issue.date_due %] >+ [% ELSE %] >+ was not renewed with error: [% issue.auto_renew_error %] > [% END %] > ", 'email'); > }); >diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl >index 2a978dcfed..e22751a980 100755 >--- a/misc/cronjobs/automatic_renewals.pl >+++ b/misc/cronjobs/automatic_renewals.pl >@@ -181,9 +181,11 @@ while ( my $auto_renew = $auto_renews->next ) { > 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 == 'auto_too_soon' ; >+ push @{$renew_digest->{ $auto_renew->branchcode }->{ $auto_renew->borrowernumber }->{issues}} $auto_renew->issue_id; > } 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' ; >+ push @{$renew_digest->{ $auto_renew->borrowernumber }->{issues}} $auto_renew->issue_id; > } > } > >@@ -292,6 +294,7 @@ sub send_digests { > error => $digest->{error}||0, > success => $digest->{success}||0, > }, >+ loops => { issues => \@{$digest->{issues} }, > tables => { > borrowers => $patron->borrowernumber, > }, >-- >2.20.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 18532
:
95030
|
95031
|
95337
|
95338
|
95456
|
96049
|
96050
|
96487
|
96494
|
96495
|
98078
|
98079
|
99193
|
99194
|
104880
|
104881
|
104882
|
104883
|
105500
|
105501
|
105502
|
105503
|
114316
|
115798
|
115799
|
115800
|
115801
|
115802
|
115829
|
115830
|
115831
|
115832
|
115833
|
118198
|
118199
|
118205
|
118318
|
118329
|
118330
|
118331
|
118356