Bug 30671

Summary: iTiva Talking Tech overdue notices generated in error when fewer than 3 overdue triggers defined
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Andrew Fuerste-Henry 2022-05-03 15:16:13 UTC
The TalkingTech_itiva_outbound.pl cronjob populates a list of overdue issues where the interval between the due date and the current date matches the delay value for one of the three triggers in overduerules.pl. However, if one has only defined delay values for some of the three available triggers, then issues are added to the csv in error because Koha saves those delays as zero rather than null.

To recreate:
- turn on the TalkingTechItivaPhoneNotification system preference
- create a letter with module=circulation, letter code=OVERDUE, and content in the iTiva format
- go to Overdue Notice and Status Triggers
- for one of your patron categories, set a first overdue with delay=1, a letter selected, and iTiva selected as its transport type. Do not set anything for 2nd and 3rd overdues for this category
- confirm you have at least one checkout in your system to a patron in this category with a due date of yesterday
- confirm you have at least one checkout in your system to a patron in this category with a due date of today
- run TalkingTech_itiva_outbound.pl with --type=OVERDUE
- check your cron output, confirm it contains both your item due yesterday (Correct!) and your checkout due today (Incorrect!)