Bug 36022 - Add default recipient phone number country code syspref for SMS::Send driver
Summary: Add default recipient phone number country code syspref for SMS::Send driver
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: David Gustafsson
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-07 16:08 UTC by David Gustafsson
Modified: 2024-07-31 20:17 UTC (History)
3 users (show)

See Also:
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 (4.68 KB, patch)
2024-02-07 16:18 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 36022: Add default recipient SMS number country code (4.67 KB, patch)
2024-02-07 16:22 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 36022: Add default recipient SMS number country code (7.40 KB, patch)
2024-02-08 17:55 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 36022: Add default recipient SMS number country code (7.40 KB, patch)
2024-02-08 17:56 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 36022: Add default recipient SMS number country code (7.41 KB, patch)
2024-02-08 17:57 UTC, David Gustafsson
Details | Diff | Splinter Review
Bug 36022: Add default recipient SMS number country code (7.41 KB, patch)
2024-02-08 18:39 UTC, David Gustafsson
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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