[Koha-bugs] [Bug 21241] Set suggestion notices message_transport_type to sms if syspref is enabled and patron has an smsalertnumber but no email address

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 7 12:45:46 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21241

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #81625|0                           |1
        is obsolete|                            |

--- Comment #13 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 82018
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82018&action=edit
Bug 21241: Conditional to choose appropriate message_transport_type for
suggestion notices

Introducing a conditional into C4/Suggestions.pm to check if no patron
email exists but a smsalertnumber does exist then the suggestion notice
message_transport_type is set to 'sms', otherwise the suggestion
message_transport_type='email'.

This ensures patrons with no email address still receieve their
suggestion notices because at present the message_transport_type is
hardcoded to 'email'.

Test plan:
1. Chose a patron who has no email address set, but does have a
smsalertnumber set (this value is set in the Patron messaging
preferences section after the SMSSendDriver syspref is set)

2. Log into the OPAC with that user and submit a suggestion

3. In the staff client go to Acquisitions->Suggestions and tick the
suggestion and set its status to 'Accepted'

4. In the database query the message_queue and notice the
message_transport_type of the message is set to 'email' even though the
patron has no email address set.

5. Apply this patch, restart memcached and plack

6. Repeat steps 2,3 with the same patron and query the message_queue
table again and notice this time the message_transport_type = 'sms'

7. Repeat steps 2,3 with a patron with no smsalertnumber or email
address. Query the database and observe the
message_transport_type=email.

If no smsalertnumber is set then the message_transport_type is set to
'email' by default

Sponsored-By: Brimbank Library, Australia

Signed-off-by: Owen Leonard <oleonard at myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list