[Bug 43884] New: queue_notice does not fall back to print when itiva cannot deliver
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 Bug ID: 43884 Summary: queue_notice does not fall back to print when itiva cannot deliver Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@openfifth.co.uk Depends on: 43380 Target Milestone: --- Bug 43380 made C4::Reserves::_koha_notify_reserve fall back to a print notice when itiva cannot deliver the notice, that is when TalkingTechItivaPhoneNotification is disabled or the patron has no phone number. Koha::Patron::queue_notice still has 'next if $mtt eq itiva && TalkingTechItivaPhoneNotification' with no phone check, so in those cases the notice is silently dropped. This affects overdue, preoverdue and the other notices that go through queue_notice. This bug aligns queue_notice with the hold-filled behaviour and adds tests. Additionally, TalkingTech_itiva_outbound.pl selects rows on the itiva preference only, so patrons with no phone number get a row with a blank phone in the CSV. It should skip rows with an empty borrowers.phone. Test plan: 1. Set TalkingTechItivaPhoneNotification to Enable. 2. Give a patron an overdue notice preference of itiva only, with a phone number set. 3. Trigger the notice (e.g. run overdue_notices.pl) and note no print notice is queued. 4. Clear the patron's phone number and repeat. 5. Note a print notice is queued. 6. Disable TalkingTechItivaPhoneNotification, restore the phone number and repeat. 7. Note a print notice is queued. 8. Run TalkingTech_itiva_outbound.pl and note that rows with no phone number are not output. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43380 [Bug 43380] Koha will generate spurious print notices if itiva is enabled and a patron has only selected phone notices -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvinke@austinseminary.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 208670 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208670&action=edit Bug 43884: Fall back to print in queue_notice when itiva cannot deliver Koha::Patron::queue_notice always skipped the itiva transport when TalkingTechItivaPhoneNotification was enabled, even if the patron has no phone number for TalkingTech_itiva_outbound.pl to call, and queued an itiva notice that nothing would send when the preference was disabled. In both cases the patron got no notice at all. Skip itiva only when the outbound script will handle it, and otherwise fall back to print, matching C4::Reserves::_koha_notify_reserve since bug 43380. Test plan: 1) Apply this patch and restart all the things! 2) Set the TalkingTechItivaPhoneNotification system preference to "Enable" 3) Pick a patron and give them a phone number 4) In the patron's "Messaging" preferences, set the "Hold reminder" notice to "Phone" only (the itiva transport), and save 5) Place a hold for them and check an item in to fill it, so the hold is waiting 6) From the command line, run the hold reminder in test mode: perl misc/cronjobs/holds/holds_reminder.pl -days 0 -v 7) Note nothing is reported for the patron: the Itiva script handles their notice, so there is nothing for Koha to queue and no print fallback 8) Edit the patron, clear the phone number, and run step 6 again 9) Note the patron "would have been sent print fallback for: itiva" 10) Set TalkingTechItivaPhoneNotification to "Disable", restore the phone number and run step 6 again 11) Note the patron "would have been sent print fallback for: itiva" again 12) Run the command once more with -c to really send, and confirm a print "Hold reminder" notice now appears on the patron's "Notices" tab (and that none appeared in step 7's configuration) 13) Run prove t/db_dependent/Koha/Patrons.t 14) Sign off :-D Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #208670|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43884 --- Comment #2 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 208715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208715&action=edit Bug 43884: Fall back to print in queue_notice when itiva cannot deliver Koha::Patron::queue_notice always skipped the itiva transport when TalkingTechItivaPhoneNotification was enabled, even if the patron has no phone number for TalkingTech_itiva_outbound.pl to call, and queued an itiva notice that nothing would send when the preference was disabled. In both cases the patron got no notice at all. Skip itiva only when the outbound script will handle it, and otherwise fall back to print, matching C4::Reserves::_koha_notify_reserve since bug 43380. Test plan: 1) Apply this patch and restart all the things! 2) Set the TalkingTechItivaPhoneNotification system preference to "Enable" 3) Pick a patron and give them a phone number 4) In the patron's "Messaging" preferences, set the "Hold reminder" notice to "Phone" only (the itiva transport), and save 5) Place a hold for them and check an item in to fill it, so the hold is waiting 6) From the command line, run the hold reminder in test mode: perl misc/cronjobs/holds/holds_reminder.pl -days 0 -v 7) Note nothing is reported for the patron: the Itiva script handles their notice, so there is nothing for Koha to queue and no print fallback 8) Edit the patron, clear the phone number, and run step 6 again 9) Note the patron "would have been sent print fallback for: itiva" 10) Set TalkingTechItivaPhoneNotification to "Disable", restore the phone number and run step 6 again 11) Note the patron "would have been sent print fallback for: itiva" again 12) Run the command once more with -c to really send, and confirm a print "Hold reminder" notice now appears on the patron's "Notices" tab (and that none appeared in step 7's configuration) 13) Run prove t/db_dependent/Koha/Patrons.t 14) Sign off :-D Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org