Bug 21776

Summary: Set ACQ_NOTIF_ON_RECEIV notice message_transport_type to sms if syspref is enabled and patron has an smsalertnumber but no email
Product: Koha Reporter: Alex Buckley <alexbuckley>
Component: NoticesAssignee: Alex Buckley <alexbuckley>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 21241    
Bug Blocks:    

Description Alex Buckley 2018-11-06 21:04:15 UTC
At present the ACQ_NOTIF_ON_RECEIV is hardcoded to always have a message_transport_type of 'email' in C4::Acquisition::NotifyOrderUsers().

If a patron does not have an email address set then they will not receieve these notices. 

This patch utilizes the new system preference 'MessageTransportTypeFallbackToSMSIfNoPatronEmail' introduced in the patches on bug 21241.

If this syspref is enabled then when a borrower has a smsalertnumber but no email address the ACQ_NOTIF_ON_RECEIV notice message_transport_type will be set to 'sms'.

If the syspref is not enabled then the notice message_transport_type will not be set to 'sms' under any combination of conditions. 

i.e. the syspref prevents an automatic fallback to using sms which could be costly for libraries.
Comment 1 Alex Buckley 2020-04-23 02:31:08 UTC
This functionality is being introduced by Bug 21781

*** This bug has been marked as a duplicate of bug 21781 ***