Bugzilla – Attachment 96123 Details for
Bug 24197
Custom destination for failed overdue notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24197: Added new local use syspref which sets the email address that failed overdue notices are set to.
Bug-24197-Added-new-local-use-syspref-which-sets-t.patch (text/plain), 3.85 KB, created by
Alex Buckley
on 2019-12-10 01:28:44 UTC
(
hide
)
Description:
Bug 24197: Added new local use syspref which sets the email address that failed overdue notices are set to.
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2019-12-10 01:28:44 UTC
Size:
3.85 KB
patch
obsolete
>From 53e331baffa0ac5d659c347018720f7a1ee97c9b Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 9 Dec 2019 23:06:06 +0000 >Subject: [PATCH] Bug 24197: Added new local use syspref which sets the email > address that failed overdue notices are set to. > >Test plan: >1. Set an email in KohaAdminEmailAddress and notice there is no syspref >named RedirectAddressForFailedOverdueNotices > >2. Set some invalid email addresses in patron records then checkout >items to those patrons making the due date in the past > >3. Manually run overdue_notices.pl > >4. Check the message_queue database table and notice the patrons with >invalid email addresses are in an email starting with the content: >'These messages were not sent directly to the patrons.' > >5. Apply patch > >6. Run database update: >cd installer/data/mysql >sudo koha-shell <instance_name> >./updatedb.pl > >7. Confirm there is a new system preference named: >RedirectAddressForFailedOverdueNotices > >Give it a different email address to that in the KohaAdminEmailAddress >syspref. > >7. Repeat steps 2-4 and notice that the failed overdue notices have been >sent to the email defined in RedirectAddressForFailedOverdueNotices > >Sponsored-By: Catalyst IT >--- > .../bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql | 1 + > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref | 5 +++++ > misc/cronjobs/overdue_notices.pl | 2 +- > 3 files changed, 7 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql b/installer/data/mysql/atomicupdate/bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql >new file mode 100644 >index 0000000000..9985656a64 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_24197-new_RedirectAddressForFailedOverdueNotices_syspref.sql >@@ -0,0 +1 @@ >+INSERT INGORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('RedirectAddressForFailedOverdueNotices', '', NULL, 'Destination email for failed overdue notices. If left empty then the branch email or KohaAdminEmailAddress syspref will be the email address that failed overdue notices are sent to', 'free'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >index 00fba12baf..08362c6ace 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref >@@ -21,6 +21,11 @@ Administration: > class: email > - "(Leave this field empty to send messages to their normal recipient)" > - >+ - "Email address failed overdue notices are sent to: " >+ - pref: RedirectAddressForFailedOverdueNotices >+ class: email >+ - "If left empty then the branch email or KohaAdminEmailAddress will be set as the destination address for failed overdue notices" >+ - > - "How much debugging information to show in the browser when an internal error occurs: " > - pref: DebugLevel > default: 0 >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 75fd593c77..a1a0b5b39e 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -821,7 +821,7 @@ END_SQL > borrowernumber => undef, > message_transport_type => 'email', > attachments => [$attachment], >- to_address => $admin_email_address, >+ to_address => C4::Context->preference('RedirectAddressForFailedOverdueNotices'), > } > ) unless $test_mode; > } >-- >2.11.0
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 24197
:
96123
|
96124
|
96125
|
103428
|
103429
|
103465
|
103466
|
109549
|
109550
|
109551
|
109552
|
109553
|
109554
|
109555