Bug 22594 - Validate SMS messaging numbers using the E.164 format
Summary: Validate SMS messaging numbers using the E.164 format
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Josef Moravec
URL:
Keywords:
: 21623 (view as bug list)
Depends on:
Blocks: 22862
  Show dependency treegraph
 
Reported: 2019-03-27 13:50 UTC by Kyle M Hall
Modified: 2019-05-09 20:30 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Adds validation to the SMS number field that conforms to international standards and adds a hint: "SMS number should be in the format 1234567890 or +11234567890" on both the OPAC and Intranet.
Version(s) released in:
19.05.00


Attachments
Bug 22594 - Validate SMS messaging numbers using the E.164 format (4.24 KB, patch)
2019-03-27 13:56 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22594 - Validate SMS messaging numbers using the E.164 format (4.97 KB, patch)
2019-03-27 14:50 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22594: Validate SMS messaging numbers using the E.164 format (5.03 KB, patch)
2019-03-27 21:09 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22594: Validate SMS messaging numbers using the E.164 format (5.08 KB, patch)
2019-04-01 15:51 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2019-03-27 13:50:59 UTC
Many SMS messaging services reject numbers that do not conform to the E.164 international public telecommunication numbering plan. On the OPAC we already 

We already tell patrons on the OPAC "Please enter numbers only. (123) 456-7890 would be entered as 1234567890." but we do not enforce this. We should be validating the patron's SMS number on both the staff side and the patron self-service for updating the SMS number.
Comment 1 Kyle M Hall 2019-03-27 13:56:13 UTC
Created attachment 87068 [details] [review]
Bug 22594 - Validate SMS messaging numbers using the E.164 format

Many SMS messaging services reject numbers that do not conform to the E.164 international public telecommunication
numbering plan.

We already tell patrons on the OPAC "Please enter numbers only. (123) 456-7890 would be entered as 1234567890."
but we do not enforce this. We should be validating the patron's SMS number on both the staff side and the patron
self-service for updating the SMS number.

Test plan:
1) Apply this patch
2) Enable SMS message ( you can set to Email to enable )
3) Test entering and updating SMS numbers on the OPAC and staff
   interfaces.
4) Note you can only enter a 1 to 14 digit number with an optional + sign
   at the beginning ( used to indicate the number includes a country calling code )
Comment 2 Kyle M Hall 2019-03-27 14:08:32 UTC
*** Bug 21623 has been marked as a duplicate of this bug. ***
Comment 3 Owen Leonard 2019-03-27 14:16:24 UTC
This looks like it's working well but I think the staff client deserves a friendly hint like the OPAC has. Nobody knows what "E.164 format" means. What about adding this:


<div class="hint">SMS number should be in the format 1234567890 or +1234567890</div>

...And changing the validator message to simply "Please enter a valid phone number."
Comment 4 Kyle M Hall 2019-03-27 14:50:32 UTC
Created attachment 87073 [details] [review]
Bug 22594 - Validate SMS messaging numbers using the E.164 format

Many SMS messaging services reject numbers that do not conform to the E.164 international public telecommunication
numbering plan.

We already tell patrons on the OPAC "Please enter numbers only. (123) 456-7890 would be entered as 1234567890."
but we do not enforce this. We should be validating the patron's SMS number on both the staff side and the patron
self-service for updating the SMS number.

Test plan:
1) Apply this patch
2) Enable SMS message ( you can set to Email to enable )
3) Test entering and updating SMS numbers on the OPAC and staff
   interfaces.
4) Note you can only enter a 1 to 14 digit number with an optional + sign
   at the beginning ( used to indicate the number includes a country calling code )
Comment 5 Liz Rea 2019-03-27 21:09:07 UTC
Created attachment 87122 [details] [review]
Bug 22594:  Validate SMS messaging numbers using the E.164 format

Many SMS messaging services reject numbers that do not conform to the E.164 international public telecommunication
numbering plan.

We already tell patrons on the OPAC "Please enter numbers only. (123) 456-7890 would be entered as 1234567890."
but we do not enforce this. We should be validating the patron's SMS number on both the staff side and the patron
self-service for updating the SMS number.

Test plan:
1) Apply this patch
2) Enable SMS message ( you can set to Email to enable )
3) Test entering and updating SMS numbers on the OPAC and staff
   interfaces.
4) Note you can only enter a 1 to 14 digit number with an optional + sign
   at the beginning ( used to indicate the number includes a country calling code )

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 6 Josef Moravec 2019-04-01 15:51:28 UTC
Created attachment 87287 [details] [review]
Bug 22594: Validate SMS messaging numbers using the E.164 format

Many SMS messaging services reject numbers that do not conform to the E.164 international public telecommunication
numbering plan.

We already tell patrons on the OPAC "Please enter numbers only. (123) 456-7890 would be entered as 1234567890."
but we do not enforce this. We should be validating the patron's SMS number on both the staff side and the patron
self-service for updating the SMS number.

Test plan:
1) Apply this patch
2) Enable SMS message ( you can set to Email to enable )
3) Test entering and updating SMS numbers on the OPAC and staff
   interfaces.
4) Note you can only enter a 1 to 14 digit number with an optional + sign
   at the beginning ( used to indicate the number includes a country calling code )

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Nick Clemens 2019-04-12 12:59:43 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize 2019-04-25 13:17:18 UTC
Enhancement will not be backported to 18.11.x series.