Bug 20475 - Patrons receiving both email and print overdue notices
Summary: Patrons receiving both email and print overdue notices
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: 17.05
Hardware: All All
: P5 - low normal with 11 votes (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-26 15:20 UTC by Andrew Fuerste-Henry
Modified: 2019-07-16 19:16 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2018-03-26 15:20:59 UTC
When attempting to send overdue notices through both email and SMS, a print notice will be generated if *either* email or SMS fails. Ideally, a print notice would only be sent if *both* email and SMS fail. Currently, enabling both email and SMS overdue notices results in patrons receiving a print notice in addition to either email or SMS.

To test:
1: Set overdue notices for a given patron category to send in both email and SMS
2: Create a patron in that category with a valid email address but no SMS number
3: Check an item out to the patron and set the due date to a past date that will generate an overdue notice
4: Run notices
5: Confirm that both email and print notices have generated

While this bug concerns a specific instance of duplicate notices, overdue notice generation and failover also presents a larger opportunity for increased customizability and clarity.
Comment 1 Chris Slone 2018-03-26 16:07:08 UTC
I can confirm that this is an issue, and furthermore will occur even if, for instance, no SMS driver is entered (and therefore SMS messages aren't fully 'enabled'). This happened at our library, something we noticed because the number of our daily print notices suddenly jumped up and remained high. Running a report confirmed that patrons with an email address, but no SMS number entered, had both an email and print overdue generated for the same item(s).
Comment 2 Barton Chittenden 2018-04-10 19:29:59 UTC
I'm marking this as priority 'normal'. The way that this is currently set up, a library that adds SMS into the overdue triggers, but doesn't have any patrons set up with SMS addresses will send a file with *all* overdues to the branchemail or admin email address... that's definitely not the desired behavior for print notices.
Comment 3 Lucas Gass 2019-07-16 19:16:14 UTC
We've side-stepped this bug with a TT conditional in the ODUE notices: 

[% IF (borrower.email == NULL && borrower.smsalertnumber == NULL) || (borrower.email == "" && borrower.smsalertnumber == "") || (borrower.email == "" && borrower.smsalertnumber == NULL) || (borrower.email == NULL && borrower.smsalertnumber == "") %] **CONTENT OF NOTICE** [% ELSE %][% END %]