Bug 36022

Summary: Add default recipient phone number country code syspref for SMS::Send driver
Product: Koha Reporter: David Gustafsson <glasklas>
Component: NoticesAssignee: David Gustafsson <glasklas>
Status: Patch doesn't apply --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: baptiste.bayche, bbryant, magnus
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:
Circulation function:
Attachments: Bug 36022: Add default recipient SMS number country code
Bug 36022: Add default recipient SMS number country code
Bug 36022: Add default recipient SMS number country code
Bug 36022: Add default recipient SMS number country code
Bug 36022: Add default recipient SMS number country code
Bug 36022: Add default recipient SMS number country code

Description David Gustafsson 2024-02-07 16:08:31 UTC
If using an international SMS::Driver it would be convenient if you could set a default country code for patron smsalertnumbers that do not include a country code, especially since Koha allows input in both formats. This will allow the user to set a default country code that will be prepended to all non interational phone numbers for the SMS::Driver->send_sms "to" parameter.
Comment 1 David Gustafsson 2024-02-07 16:18:48 UTC
Created attachment 161819 [details] [review]
Bug 36022: Add default recipient SMS number country code

Add SMSSendDefaultCountryCode syspref to prepend country
code to non international SMS numbers.

To test: TODO
Comment 2 David Gustafsson 2024-02-07 16:21:17 UTC
Will attach a test plan once I've figured out how to test, since it's not currently possible to inspect the parameters of send_sms it's not obvious how to do this.
Comment 3 David Gustafsson 2024-02-07 16:22:38 UTC
Created attachment 161820 [details] [review]
Bug 36022: Add default recipient SMS number country code

Add SMSSendDefaultCountryCode syspref to prepend country
code to non international SMS numbers.

To test: TODO
Comment 4 David Gustafsson 2024-02-08 17:55:36 UTC
Created attachment 161946 [details] [review]
Bug 36022: Add default recipient SMS number country code

Add SMSSendDefaultCountryCode syspref to prepend country
code to non international SMS numbers.

To test:
1) Apply patch and run updatedatabase.pl
2) Verify that SMSSendDefaultCountryCode syspref can be set
  staff interface system preferences
3) Verify all tests pass in t/SMS.t

Sponsored-by: Gothenburg University Library
Comment 5 David Gustafsson 2024-02-08 17:56:23 UTC
Created attachment 161947 [details] [review]
Bug 36022: Add default recipient SMS number country code

Add SMSSendDefaultCountryCode syspref to prepend country
code to non international SMS numbers.

To test:
1) Apply patch and run updatedatabase.pl
2) Verify that SMSSendDefaultCountryCode syspref can be set
   in staff interface system preferences
3) Verify all tests pass in t/SMS.t

Sponsored-by: Gothenburg University Library
Comment 6 David Gustafsson 2024-02-08 17:57:40 UTC
Created attachment 161948 [details] [review]
Bug 36022: Add default recipient SMS number country code

Add SMSSendDefaultCountryCode syspref to prepend country
code to non international SMS numbers.

To test:
1) Apply patch and run updatedatabase.pl
2) Verify that SMSSendDefaultCountryCode syspref can be set
   in staff interface system preferences
3) Verify all tests pass in t/SMS.t

Sponsored-by: Gothenburg University Library
Comment 7 David Gustafsson 2024-02-08 17:58:20 UTC
Added tests, should now be ready for signoff.
Comment 8 David Gustafsson 2024-02-08 18:39:17 UTC
Created attachment 161949 [details] [review]
Bug 36022: Add default recipient SMS number country code

Add SMSSendDefaultCountryCode syspref to prepend country
code to non international SMS numbers.

To test:
1) Apply patch and run updatedatabase.pl
2) Verify that SMSSendDefaultCountryCode syspref can be set
   in staff interface system preferences
3) Verify all tests pass in t/SMS.t

Sponsored-by: Gothenburg University Library