https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21781
--- Comment #33 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 210105 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210105&action=edit Bug 21781: (QA follow-up) Only fall back to SMS for notices with an SMS template, fix regressions, add tests * Only fall back to SMS when the notice has an SMS template for the patron's library or the default one. This is how a library opts a notice out of the fallback: it doesn't define an SMS template for it. Without one the notice is sent as it was before. * queue_notice only falls back to SMS for transports that were asked for explicitly, not for the transports a patron chose in their own messaging preferences, which still fall back to print. * Suggestion notices now use the SMS template when they fall back to SMS, they were still prepared with the email one. * opac-shareshelf.pl: restore the early return when there is nobody to send the notice to, and the recipient (borrowernumber and, for email, to_address) which the notice lost along the way. Without them the message could never be sent. * Reword the system preference to say the fallback depends on the SMS template, fix the missing newline at the end of patrons.pref and tidy Koha/Patron.pm. * Add tests for Koha::Patron->message_transport_type_for, the queue_notice fallback, suggestion notices and the order received notice. To test: 1. prove t/db_dependent/Koha/Patrons.t t/db_dependent/Suggestions.t \ t/db_dependent/Acquisition/NotifyOrderUsers.t 2. Enable FallbackToSMSIfNoEmail and set SMSSendDriver 3. With a patron with an SMS number and no email address, receive an order they are notified about (ACQ_NOTIF_ON_RECEIV) => The notice is sent by SMS, using the SMS template 4. Delete the SMS template for ACQ_NOTIF_ON_RECEIV and repeat => The notice is queued as email as before Sponsored-by: OpenFifth Co-Authored-By: Claude Sonnet 5.5 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
