The script checks if there is a letter when falling back to print, but it shoudl also check for the content of that letter
Created attachment 112650 [details] [review] Bug 26851: Don't generate a notice to library if no content To test: 1 - Check out an over due to a patron 2 - Set overdue triggers to a trigger less than number of days overdue 3 - Make sure the patron has no email 4 - Set content of ODUE notice to: [%# Comment will not print %] 5 - perl misc/cronjobs/overdue_notices.pl 6 - Check the message queue 7 - There is a notice sent to the library: "These messages were not sent directly to the patrons." With no messages 8 - Apply patch 9 - Repeat 10 - No new message generated
Created attachment 114371 [details] [review] Bug 26851: Don't generate a notice to library if no content To test: 1 - Check out an over due to a patron 2 - Set overdue triggers to a trigger less than number of days overdue 3 - Make sure the patron has no email 4 - Set content of ODUE notice to: [%# Comment will not print %] 5 - perl misc/cronjobs/overdue_notices.pl 6 - Check the message queue 7 - There is a notice sent to the library: "These messages were not sent directly to the patrons." With no messages 8 - Apply patch 9 - Repeat 10 - No new message generated Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
It works :) QA question, is that expected for a space char in the content to cause the message to be sent?
(In reply to Victor Grousset/tuxayo from comment #3) > It works :) > > QA question, is that expected for a space char in the content to cause the > message to be sent? I would say yes, to allow the possibility that a library only wants the subject line sent.
I feel like we ought to be catching this in a few other places too.. this does indeed fix the issue for print notices for overdues.. but what about other print notice types?
Created attachment 115016 [details] [review] Bug 26851: Don't generate a notice to library if no content To test: 1 - Check out an over due to a patron 2 - Set overdue triggers to a trigger less than number of days overdue 3 - Make sure the patron has no email 4 - Set content of ODUE notice to: [%# Comment will not print %] 5 - perl misc/cronjobs/overdue_notices.pl 6 - Check the message queue 7 - There is a notice sent to the library: "These messages were not sent directly to the patrons." With no messages 8 - Apply patch 9 - Repeat 10 - No new message generated Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
You can safely ignore my above comment.. This patch does as expected without regressions.. we could later followup to prevent other print notices ending up in the message queue I believe but that's for another day. Passing QA
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.02
Pushed to 20.05.x for 20.05.08
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.