Currently failed overdue notices are sent to the branch email , or when that is not set to the KohaAdminEmailAddress syspref. Several of our clients have requested a seperate email address for failed overdue notices to be sent to. This email address will be defined in the: RedirectAddressForFailedOverdueNotices syspref.
Created attachment 96123 [details] [review] 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
Created attachment 96124 [details] [review] 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
Created attachment 96125 [details] [review] 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
Thanks for tagging this 20.05 candidate Martin, I've just applying the patch and it doesn't apply on master. Attaching a corrected patch now.
Created attachment 103428 [details] [review] Bug 24197: Added new local use syspref which sets the email address that failed overdue notices are set to. Test plan: 1. Set no email addresses in patron record then checkout items to the patron making the due date in the past 2. Visit patron's home library page: Administration > Libraries Set a branch email and in global system preferences observe there is no syspref named RedirectAddressForFailedOverdueNotices 3. Manually run overdue_notices.pl 4. Check the message_queue database table and observe there is a print overdue notice and a email notice with to_address of the branch email address 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 branch email. 7. Repeat steps 1,3,4 and observe that the failed overdue notices have been sent to the email defined in RedirectAddressForFailedOverdueNotices Sponsored-By: Catalyst IT
Created attachment 103429 [details] [review] Bug 24197: Changed use of 'branch' terminology to 'library' Sponsored-by: Catalyst IT
All ready to test :)
Created attachment 103465 [details] [review] Bug 24197: Added new local use syspref which sets the email address that failed overdue notices are set to. Test plan: 1. Set no email addresses in patron record then checkout items to the patron making the due date in the past 2. Visit patron's home library page: Administration > Libraries Set a branch email and in global system preferences observe there is no syspref named RedirectAddressForFailedOverdueNotices 3. Manually run overdue_notices.pl 4. Check the message_queue database table and observe there is a print overdue notice and a email notice with to_address of the branch email address 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 branch email. 7. Repeat steps 1,3,4 and observe that the failed overdue notices have been sent to the email defined in RedirectAddressForFailedOverdueNotices Sponsored-By: Catalyst IT Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 103466 [details] [review] Bug 24197: Changed use of 'branch' terminology to 'library' Sponsored-by: Catalyst IT Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected, passes QA scripts.. Signing Off
The preference description is not correct for libraries using the *replyto functionality to avoid having the emails marked as spam. See here: - my $branch_email_address = $library->inbound_email_address; + my $branch_email_address = C4::Context->preference('RedirectAddressForFailedOverdueNotices') + || $library->inbound_email_address; The inbound_email_address is not the KohaAdminEmailAdress or branchemail in htese cases. Can you please check and adapt the wording?
Created attachment 109549 [details] [review] Bug 24197: Added new local use syspref which sets the email address that failed overdue notices are set to. Test plan: 1. Set no email addresses in patron record then checkout items to the patron making the due date in the past 2. Visit patron's home library page: Administration > Libraries Set a branch email and in global system preferences observe there is no syspref named RedirectAddressForFailedOverdueNotices 3. Manually run overdue_notices.pl 4. Check the message_queue database table and observe there is a print overdue notice and a email notice with to_address of the branch email address 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 branch email. 7. Repeat steps 1,3,4 and observe that the failed overdue notices have been sent to the email defined in RedirectAddressForFailedOverdueNotices Sponsored-By: Catalyst IT Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 109550 [details] [review] Bug 24197: Changed use of 'branch' terminology to 'library' Sponsored-by: Catalyst IT Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 109551 [details] [review] Bug 24197: (QA follow-up) Embelished syspref description As requested, I have embelished the syspref description to more accurately depict the fallback sequence for email delivery. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Patch rescued, ready for second QA run.
Created attachment 109552 [details] [review] Bug 24197: Added new local use syspref which sets the email address that failed overdue notices are set to. Test plan: 1. Set no email addresses in patron record then checkout items to the patron making the due date in the past 2. Visit patron's home library page: Administration > Libraries Set a branch email and in global system preferences observe there is no syspref named RedirectAddressForFailedOverdueNotices 3. Manually run overdue_notices.pl 4. Check the message_queue database table and observe there is a print overdue notice and a email notice with to_address of the branch email address 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 branch email. 7. Repeat steps 1,3,4 and observe that the failed overdue notices have been sent to the email defined in RedirectAddressForFailedOverdueNotices Sponsored-By: Catalyst IT Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 109553 [details] [review] Bug 24197: Changed use of 'branch' terminology to 'library' Sponsored-by: Catalyst IT Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 109554 [details] [review] Bug 24197: (QA follow-up) Embelished syspref description As requested, I have embelished the syspref description to more accurately depict the fallback sequence for email delivery. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 109555 [details] [review] Bug 24197: (QA follow-up) Shorten syspref name to AddressForFailedEmailNotices If you define the address we use it, if not we fallback, it's not really a redirect, and that just makes the name longer. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Last patch can be accepted or ignored, just trying to keep pref names under control :-)
Not blocker but: shouldn't have it been defined at library level instead?
Pushed to master for 20.11, thanks to everybody involved!
(In reply to Jonathan Druart from comment #21) > Not blocker but: shouldn't have it been defined at library level instead? I did wonder that myself when testing, but then decided that we have a pattern of introducing a system level default and then enhancing later with library level refinement if it proves useful. I'm still keen to overhaul how library emails get associated at some point but didn't think that should hold this piece up either.
enhancement will not be backported to 20.05.x series
It seems too bad this wasn't done for all emails and not just overdue emails...