For SMS messages to be sent, the patron has to have a phone number to receive text messages and their carrier. When an enhanced message sends(advance notices, holds, checkin, checkouts) it takes the phone number and adds the appropriate carrier information to it. For the Over Notices, the SMS number is not getting attached to the carrier information, the email information is being used instead. Thus the patron is receiving an SMS overdue notice via their email address instead of through a text message. See below- an advanced notice of Item due sent via SMS uses the phone number, however, the overdue Notice uses the email address: select message_id, to_address, subject, message_transport_type as mtt from message_queue where message_transport_type='sms' and date(time_queued) = CURRENT_DATE limit 10; +------------+------------------------------------------------------+----------------------------+-----+ | message_id | to_address | subject | mtt | +------------+------------------------------------------------------+----------------------------+-----+ | 549913 | cabs@gmail.com@vtext.com@vtext.com@vtext.com | Overdue Notice | sms | | 551808 | llie.re@btx.gov@txt.att.net | Overdue Notice | sms | | 551811 | nbur5@tx.rr.com@tmomail.net | Overdue Notice | sms | | 551814 | jbeel@gmail.com@vtext.com | Overdue Notice | sms | | 551871 | 8172284361@tmomail.net | Advance Notice of Item Due | sms | | 551873 | 8172284361@tmomail.net | Advance Notice of Item Due | sms | | 551875 | 8172284361@tmomail.net | Advance Notice of Item Due | sms | | 551901 | 817-879-8111@txt.att.net | Advance Notice of Item Due | sms | | 551904 | 817-879-8111@txt.att.net | Advance Notice of Item Due | sms | | 551906 | 817-879-8111@txt.att.net | Advance Notice of Item Due | sms | +------------+------------------------------------------------------+----------------------------+-----+
Created attachment 65312 [details] [review] Bug 18990 - Overdue Notices are not sending through SMS correctly Bug 18478 fixed sms via email problems under the assumption that to_address was either smsalertnumber or blank. It seems overdues set the to_address to email. This patch changes the code to enforce that an sms sent with emial driver will use the smsalertnumebr and provider defined for the borrower, regardless of what is set in the queue To test: 1 - Define a messaging prefs for a patron to recieve hold notices via SMS 2 - Ensure you have defined an SMS message for an overdue letter 3 - Set an SMS alert number for patron 4 - Set the SMS::Send driver to 'Email' 5 - Checkout an item as overdue to trigger notice above 6 - Run overdue_notices.pl 6 - Check the db and note the address is email 7 - run process_message_queue.pl 8 - Check db - address is email followed by service provider 9 - Apply patch 10 - repeat 11 - Message to_address should be populated with smsalertnumber
Created attachment 66308 [details] [review] [SIGNED-OFF] Bug 18990 - Overdue Notices are not sending through SMS correctly Bug 18478 fixed sms via email problems under the assumption that to_address was either smsalertnumber or blank. It seems overdues set the to_address to email. This patch changes the code to enforce that an sms sent with emial driver will use the smsalertnumebr and provider defined for the borrower, regardless of what is set in the queue To test: 1 - Define a messaging prefs for a patron to recieve hold notices via SMS 2 - Ensure you have defined an SMS message for an overdue letter 3 - Set an SMS alert number for patron 4 - Set the SMS::Send driver to 'Email' 5 - Checkout an item as overdue to trigger notice above 6 - Run overdue_notices.pl 6 - Check the db and note the address is email 7 - run process_message_queue.pl 8 - Check db - address is email followed by service provider 9 - Apply patch 10 - repeat 11 - Message to_address should be populated with smsalertnumber Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 67686 [details] [review] Bug 18990 - Overdue Notices are not sending through SMS correctly Bug 18478 fixed sms via email problems under the assumption that to_address was either smsalertnumber or blank. It seems overdues set the to_address to email. This patch changes the code to enforce that an sms sent with emial driver will use the smsalertnumebr and provider defined for the borrower, regardless of what is set in the queue To test: 1 - Define a messaging prefs for a patron to recieve hold notices via SMS 2 - Ensure you have defined an SMS message for an overdue letter 3 - Set an SMS alert number for patron 4 - Set the SMS::Send driver to 'Email' 5 - Checkout an item as overdue to trigger notice above 6 - Run overdue_notices.pl 6 - Check the db and note the address is email 7 - run process_message_queue.pl 8 - Check db - address is email followed by service provider 9 - Apply patch 10 - repeat 11 - Message to_address should be populated with smsalertnumber Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 69080 [details] [review] Bug 18990 - Overdue Notices are not sending through SMS correctly Bug 18478 fixed sms via email problems under the assumption that to_address was either smsalertnumber or blank. It seems overdues set the to_address to email. This patch changes the code to enforce that an sms sent with emial driver will use the smsalertnumebr and provider defined for the borrower, regardless of what is set in the queue To test: 1 - Define a messaging prefs for a patron to recieve hold notices via SMS 2 - Ensure you have defined an SMS message for an overdue letter 3 - Set an SMS alert number for patron 4 - Set the SMS::Send driver to 'Email' 5 - Checkout an item as overdue to trigger notice above 6 - Run overdue_notices.pl 6 - Check the db and note the address is email 7 - run process_message_queue.pl 8 - Check db - address is email followed by service provider 9 - Apply patch 10 - repeat 11 - Message to_address should be populated with smsalertnumber Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 18.05, thanks to everybody involved!
Pushed to stable for 17.11.01, awesome work all!
Pushed to 17.05.x, will be in v17.05.07 Just had to change $patron->smsalertnumber into $member->{'smsalertnumber'}