https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43968
--- Comment #1 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 210159 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210159&action=edit Bug 43968: Replace FallbackToSMSIfNoEmail with MessageTransportFallbackOrder FallbackToSMSIfNoEmail could only make email fall back to SMS, and which notices it applied to was decided in code. Replace it with a single ordered list of message transports to fall back to, for example 'email,sms,print'. When a patron cannot be sent a notice with the transport it would be sent with (no email address, no SMS number and SMS driver, no phone number), the transports that follow it in the list are tried, and the first one the patron can receive is used. A transport only gets used as a fallback if the notice has a template for it, so a library opts a notice out of a fallback by not defining a template for that transport. If nothing can be used, the notice is sent as it was before. Left empty, there is no fallback. As before, only transports asked for explicitly fall back this way: the transports a patron chose in their messaging preferences are left alone, and still fall back to print. The atomic update moves the value of the old preference: enabled becomes 'email,sms' and disabled becomes empty. To test: 1. Apply the patch and run the database update => If FallbackToSMSIfNoEmail was enabled, MessageTransportFallbackOrder is 'email,sms', otherwise it is empty 2. prove t/db_dependent/Koha/Patrons.t t/db_dependent/Suggestions.t \ t/db_dependent/Acquisition/NotifyOrderUsers.t 3. Set SMSSendDriver and MessageTransportFallbackOrder to 'email,sms,print' 4. For a patron with no email address and no SMS number, receive an order they are notified about (ACQ_NOTIF_ON_RECEIV) => A print notice is queued 5. Give the patron an SMS number => The notice is queued as SMS, using the SMS template 6. Delete the SMS template for ACQ_NOTIF_ON_RECEIV => The notice is queued as print 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/
