Created attachment 10357 [details] [review] Bug 8267 - Overdue notices not working
The variable $i was being re-used and overwriting the necessary value that was being passed to a subroutine. Renaming $i to $j fixed it. I also added an extra safety check within parse_letter that would also have prevented this bug.
I am changing this from "enhancement" to "blocker." It is a pretty important bug. No overdue notices are going out for libraries on 3.8.1 at all (neither email nor print).
Created attachment 10386 [details] [review] [SIGNED-OFF] Bug 8267 - Overdue notices not working Without patch: Used letter corresponds to the number of issues in notice triggers: 1 issue => First trigger letter 2 issues => Second trigger letter ... 4 issues and more => Error: no more than 3 triggers =) Patch fix the problem.
Small fix, explained. Looks good to me. Passed QA
Patch pushed, update the patch description with comment 2
This bug is also a cogent reminder to have use warnings; and check logs. Since this would have been warning all over the place about $i being redefined. Pushed to 3.8.x will be in 3.8.3