[Koha-bugs] [Bug 30026] International phone number not supported for sending SMS

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 6 20:43:51 CEST 2022


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

Owen Leonard <oleonard at myacpl.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #130167|0                           |1
        is obsolete|                            |
 Attachment #131375|0                           |1
        is obsolete|                            |

--- Comment #13 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 134756
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134756&action=edit
Bug 30026: SMSAlert regex fixed for international

When registering a phone number for SMS alerts, the number goes through
a regex filter to make sure the number is valid. One of the formats used
in Europe is 00 AAA XXXXXXXXX (A = country indicator) and it is not
supported.

This patch adjusts the regex to either accept 00 AAA XXXXXXXXX or
+AAAXXXXXXXXX in this case. (Note : +AAA and 00AAA are mutually exclusive).

To test:
1) You need to have installed a SMSAlert plugin. Make sure the
   SMSSendDriver syspref is also set up with your SMS plugin of choice.
2) Pick a patron and edit its profile.
3) In the messaging preferences fieldset, under SMS number, enter any
   number with the format 00 AAA XXXXXXXXX (ie : 00111123456789).
   Try to save the modification : you should have an error message.
4) Try instead a number with the format +AAAXXXXXXXXX (ie :
   111123456789), that one should be accepted.
5) Save your modification then check that the number has been changed.
6) Apply patch.
7) Repeat step 3 to 5.
8) Observe the error is gone.
9) Try it once more with the format +00 AAA XXXXXXXXX (+00111123456789),
   that format should not be accepted: this is intentional.
10) Sign off.

    Thanks-to: Didier Gautheron <didier.gautheron at biblibre.com>

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

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


More information about the Koha-bugs mailing list