Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
Summary: Add SMS via email as an alternative to SMS services via SMS::Send drivers
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 16188 15942 15943 18091 18457 19179 19857
  Show dependency treegraph
 
Reported: 2012-11-07 13:03 UTC by Kyle M Hall
Modified: 2019-10-14 19:56 UTC (History)
18 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (20.09 KB, patch)
2012-11-07 16:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers [v3.08.03] (19.67 KB, patch)
2012-11-07 16:51 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (20.14 KB, patch)
2012-11-07 17:57 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (20.13 KB, patch)
2012-11-07 18:13 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers - Followup (3.62 KB, patch)
2012-12-17 16:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (23.29 KB, patch)
2012-12-17 16:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (23.30 KB, patch)
2013-01-02 15:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (15.12 KB, patch)
2013-02-26 14:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (18.80 KB, patch)
2013-02-26 14:42 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (18.80 KB, patch)
2013-02-26 15:02 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (18.80 KB, patch)
2013-02-26 15:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (18.59 KB, patch)
2013-03-21 13:47 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.57 KB, patch)
2013-04-09 14:57 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.74 KB, patch)
2013-10-02 17:14 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.73 KB, patch)
2013-10-28 18:52 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.73 KB, patch)
2014-05-27 13:08 UTC, Benjamin Rokseth
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.74 KB, patch)
2014-07-21 13:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.11 KB, patch)
2014-10-16 17:12 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.93 KB, patch)
2014-12-08 16:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.91 KB, patch)
2014-12-08 16:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (24.86 KB, patch)
2015-02-10 20:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.36 KB, patch)
2015-06-29 14:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.59 KB, patch)
2015-11-03 11:54 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.55 KB, patch)
2015-11-25 16:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.78 KB, patch)
2015-12-31 21:27 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Schema update (2.83 KB, patch)
2015-12-31 21:54 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Schema update (4.78 KB, patch)
2015-12-31 21:57 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Flag issues (1.89 KB, patch)
2016-01-01 05:35 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.83 KB, patch)
2016-01-01 05:47 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Schema update (4.83 KB, patch)
2016-01-01 05:47 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Flag issues (1.94 KB, patch)
2016-01-01 05:47 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.83 KB, patch)
2016-01-21 15:01 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Schema update (4.37 KB, patch)
2016-01-21 15:02 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Flag issues (1.94 KB, patch)
2016-01-21 15:02 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.85 KB, patch)
2016-01-21 15:18 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Schema update (4.37 KB, patch)
2016-01-21 15:18 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Flag issues (1.94 KB, patch)
2016-01-21 15:18 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021: Schema update (4.42 KB, patch)
2016-01-27 13:18 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021: Flag issues (1.99 KB, patch)
2016-01-27 13:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Use TT plugin instead of passing syspref via script (2.47 KB, patch)
2016-02-09 15:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Use Modern::Perl (688 bytes, patch)
2016-02-09 15:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Fix ENGINE, don't create index on FK (1.16 KB, patch)
2016-02-09 15:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Use same color as circ rules editor for row highlighting (1.26 KB, patch)
2016-02-09 15:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Switch to Koha::Object(s) (9.34 KB, patch)
2016-02-09 15:48 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Switch to Koha::Object(s) (9.34 KB, patch)
2016-02-10 13:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 - Add feedback to delete button if provider is being used (5.05 KB, patch)
2016-02-10 13:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Add feedback to delete button if provider is being used (5.06 KB, patch)
2016-02-10 13:57 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Add column to deleted borrowers, set null on provider deletion (3.37 KB, patch)
2016-02-10 13:57 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Unit tests (2.79 KB, patch)
2016-02-12 15:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Add additional message to deletion warning if provider is in use. (2.03 KB, patch)
2016-02-12 19:51 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.92 KB, patch)
2016-02-12 20:05 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021: Schema update (4.49 KB, patch)
2016-02-12 20:06 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021: Flag issues (2.06 KB, patch)
2016-02-12 20:06 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Use TT plugin instead of passing syspref via script (2.53 KB, patch)
2016-02-12 20:06 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Use Modern::Perl (753 bytes, patch)
2016-02-12 20:07 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Fix ENGINE, don't create index on FK (1.22 KB, patch)
2016-02-12 20:07 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Use same color as circ rules editor for row highlighting (1.32 KB, patch)
2016-02-12 20:07 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Switch to Koha::Object(s) (9.41 KB, patch)
2016-02-12 20:08 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Add feedback to delete button if provider is being used (5.13 KB, patch)
2016-02-12 20:08 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Add column to deleted borrowers, set null on provider deletion (3.44 KB, patch)
2016-02-12 20:08 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Unit tests (2.85 KB, patch)
2016-02-12 20:09 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9021 [QA Followup] - Add additional message to deletion warning if provider is in use. (2.09 KB, patch)
2016-02-12 20:09 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers (25.98 KB, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021: Schema update (4.55 KB, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021: Flag issues (2.12 KB, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Use TT plugin instead of passing syspref via script (2.59 KB, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Use Modern::Perl (814 bytes, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Fix ENGINE, don't create index on FK (1.28 KB, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Use same color as circ rules editor for row highlighting (1.38 KB, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Switch to Koha::Object(s) (9.46 KB, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Add feedback to delete button if provider is being used (5.19 KB, patch)
2016-02-15 16:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Add column to deleted borrowers, set null on provider deletion (3.50 KB, patch)
2016-02-15 16:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Unit tests (2.91 KB, patch)
2016-02-15 16:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021 [QA Followup] - Add additional message to deletion warning if provider is in use. (2.15 KB, patch)
2016-02-15 16:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021: Fix conflict with bug 15446 (type vs _type) (1.11 KB, patch)
2016-02-15 16:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021: Save the provider even if the sms number is not modified (1.38 KB, patch)
2016-02-15 16:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9021: Save the provider even if the sms number is not modified (1.38 KB, patch)
2016-02-15 16:32 UTC, Jonathan Druart
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 2012-11-07 13:03:04 UTC
Nearly all cellular providers allow a person to send an text message to a cellular phone by sending an email to phonenumber@provider. We can leverage this capability to add the ability for Koha to send sms messages to patrons without the need to subscribe to an sms gateway server.

Basic plan:
1. Add a table sms_providers to the db to tell Koha what service providers are available, and what domain emails should be sent to.
2. Add borrowers.sms_provider_id to tell Koha which mobile service the patron subscribes to for the number given in smsalertnumber
3. Modify Koha to send an email rather than using SMS::Send if the driver is set to 'Email'
Comment 1 Kyle M Hall 2012-11-07 16:29:49 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2012-11-07 16:51:18 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2012-11-07 17:57:05 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2012-11-07 18:04:55 UTC
Test plan:
0) Get a mobile phone
1) Apply the patch
2) Run updatedatabase.pl
3) Set the value of SMSSendDriver to 'Email'
4) Go to the admin page, the "Additional parameters" area should now have the link "SMS cellular providers"
5) On this page, add some providers. Make sure to add the provider for your own cellular phone service.

Here are some examples:
Sprint	 phonenumber@messaging.sprintpcs.com
Verizon	 phonenumber@vtext.com
T-Mobile phonenumber@tmomail.net
AT&T	 phonenumber@txt.att.net

Only add the domain part in the 'domain' field. So for Verizon, that would be 'vtext.com'

6) Create an account for yourself, add your SMS number, and select your provider from the dropdown box directly below it.

7) Enable SMS messaging for Item check-in and Item checkout
8) Check out an item to yourself
9) Run process_message_queue.pl
10) Wait! You should receive a text message shortly, when I tested it, I received my sms message within the minute.
Comment 5 Kyle M Hall 2012-11-07 18:13:56 UTC Comment hidden (obsolete)
Comment 6 Melia Meggs 2012-11-08 00:49:04 UTC
I tested this today on the Sprint network and received the item checkout text message on my phone.  Yay!

This needs additional non-ByWater testing and signoff, please, preferably on a variety of mobile networks!

Thanks,

Melia
Comment 7 Kyle M Hall 2012-11-09 17:10:52 UTC
Just an aside, I confirmed this works with Verizon using vtext.com. In theory, we could pre-load useful sets of providers during the Koha's web-based setup phase.

Kyle

(In reply to comment #6)
> I tested this today on the Sprint network and received the item checkout
> text message on my phone.  Yay!
> 
> This needs additional non-ByWater testing and signoff, please, preferably on
> a variety of mobile networks!
> 
> Thanks,
> 
> Melia
Comment 8 Kyle M Hall 2012-12-17 16:06:34 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall 2012-12-17 16:07:13 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2012-12-28 15:59:20 UTC
Just a comment after a quick look at the patch, there is a bad copy/paste:

+DROP TABLE IF EXISTS sessions;
+CREATE TABLE `sms_providers` (
Comment 11 Kyle M Hall 2013-01-02 15:28:23 UTC Comment hidden (obsolete)
Comment 12 Kyle M Hall 2013-01-02 15:28:56 UTC
Fixed! Thanks!

(In reply to comment #10)
> Just a comment after a quick look at the patch, there is a bad copy/paste:
> 
> +DROP TABLE IF EXISTS sessions;
> +CREATE TABLE `sms_providers` (
Comment 13 Kyle M Hall 2013-02-26 14:28:38 UTC Comment hidden (obsolete)
Comment 14 Kyle M Hall 2013-02-26 14:42:10 UTC Comment hidden (obsolete)
Comment 15 Kyle M Hall 2013-02-26 15:02:13 UTC Comment hidden (obsolete)
Comment 16 Kyle M Hall 2013-02-26 15:20:49 UTC Comment hidden (obsolete)
Comment 17 cedric.vita 2013-03-20 08:46:33 UTC
Something went wrong !
Applying: Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Auto-merging members/memberentry.pl
Failed to merge in the changes.
Patch failed at 0001 Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers

Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
Apply? [yn]
Patch left in /tmp/Bug-9021---Add-SMS-via-email-as-an-alternative-to--IdzAav.patch
Comment 18 Kyle M Hall 2013-03-21 13:47:57 UTC Comment hidden (obsolete)
Comment 19 Jonathan Druart 2013-03-29 09:40:09 UTC
Kyle,
Your last patch does not include new files (admin/sms_providers.[pl|tt]).
Marked as Failed QA.
Comment 20 Kyle M Hall 2013-04-09 14:57:53 UTC Comment hidden (obsolete)
Comment 21 I'm just a bot 2013-09-18 11:13:52 UTC
Applying: Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
Using index info to reconstruct a base tree...
M	C4/Letters.pm
M	C4/Members.pm
M	installer/data/mysql/kohastructure.sql
M	installer/data/mysql/updatedatabase.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
M	koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt
M	members/memberentry.pl
Falling back to patching base and 3-way merge...
Auto-merging members/memberentry.pl
Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging C4/Members.pm
CONFLICT (content): Merge conflict in C4/Members.pm
Auto-merging C4/Letters.pm
Patch failed at 0001 Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
The copy of the patch that failed is found in:
   /home/christopher/git/koha/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 22 Kyle M Hall 2013-10-02 17:14:13 UTC Comment hidden (obsolete)
Comment 23 I'm just a bot 2013-10-03 07:00:51 UTC
Patch applied cleanly, go forth and signoff
Comment 24 I'm just a bot 2013-10-28 06:21:23 UTC
Applying: Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
Using index info to reconstruct a base tree...
M	C4/Letters.pm
M	C4/Members.pm
M	installer/data/mysql/kohastructure.sql
M	installer/data/mysql/updatedatabase.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging C4/Members.pm
CONFLICT (content): Merge conflict in C4/Members.pm
Auto-merging C4/Letters.pm
Patch failed at 0001 Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
The copy of the patch that failed is found in:
   /home/christopher/git/koha/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 25 Chris Cormack 2013-10-28 18:52:42 UTC Comment hidden (obsolete)
Comment 26 Christopher Brannon 2014-03-26 17:06:31 UTC
Kyle,
I'm curious about this development.  Please forgive my ignorance on this, if this has already been discussed somewhere.

Since the phone is utilizing an e-mail address already, why not just put the phone e-mail address in place of the e-mail address in the patron account, and have a setting next to the e-mail field to switch between standard and brief, where this setting would switch from the normal notice template to a shorter notice template.  For example, instead of using the HOLD template, if brief is selected next to the e-mail field, then the HOLD (BRIEF) template would be used.

Just a thought.  Maybe I am missing something more complex?

Christopher
Comment 27 Benjamin Rokseth 2014-05-27 13:08:19 UTC Comment hidden (obsolete)
Comment 28 Benjamin Rokseth 2014-05-27 13:12:59 UTC
Took the liberty to rebase against master 3.17.007.

Works as advertised, but before I sign off, is it feasible to have the C4::Letters::_send_message_by_email respect the message_transport_type (sms) and then use the sms template in the generated notice?
Comment 29 Kyle M Hall 2014-07-21 13:16:48 UTC Comment hidden (obsolete)
Comment 30 Thomas Johnson 2014-10-12 01:23:59 UTC
I just tried applying this patch and received the below errors. Hopefully it's an error on my end applying the patch. The Koha version that I was applying to is 3.17.00.027.
============================================================================== 

Applying: Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging members/memberentry.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging admin/admin-home.pl
CONFLICT (content): Merge conflict in admin/admin-home.pl
Auto-merging C4/Members.pm
Auto-merging C4/Letters.pm
Failed to merge in the changes.
Patch failed at 0001 Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers

29927 - Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers

Apply? [(y)es, (n)o, (i)nteractive] Patch left in /tmp/Bug-9021---Add-SMS-via-email-as-an-alternative-to--pOiIVH.patch
Comment 31 Kyle M Hall 2014-10-16 17:12:25 UTC Comment hidden (obsolete)
Comment 32 Kyle M Hall 2014-12-08 16:05:59 UTC Comment hidden (obsolete)
Comment 33 Kyle M Hall 2014-12-08 16:08:39 UTC Comment hidden (obsolete)
Comment 34 Brendan Gallagher 2015-02-10 19:50:23 UTC
Didn't apply cleanly.  Kyle can you rebase this.  (it's just the updatedatabase.pl and structure ones.  Should be pretty quick.  I'd like to find someone to sign-off on this.

Thanks,
Brendan
Comment 35 Kyle M Hall 2015-02-10 20:08:33 UTC Comment hidden (obsolete)
Comment 36 Mark Tompsett 2015-06-21 03:41:08 UTC
Just when I figured out how to email to sms for my Canadian provider, the patch doesn't apply. :(
Comment 37 Kyle M Hall 2015-06-29 14:23:00 UTC Comment hidden (obsolete)
Comment 38 Mark Tompsett 2015-06-29 21:33:10 UTC
Could we get a back button that goes back to the administration screen from the SMS Provider entry screen?
Comment 39 Kyle M Hall 2015-07-17 10:59:06 UTC
(In reply to M. Tompsett from comment #38)
> Could we get a back button that goes back to the administration screen from
> the SMS Provider entry screen?

I can, but I'm looking at all the administration areas and a not of them has such a link, so it seems like it would be breaking ui consistency to do so. There is a 'administration' link in the breadcrumbs that will take you back to the administration screen. Is that sufficient?
Comment 40 Kyle M Hall 2015-07-17 13:36:08 UTC
From IRC: library and groups, item types, AV new category, AV new AV, Patron attribute types, (strangely) library transfer limits, cities and towns, ... - cancel link.
I could keep going, but the whole cancel link idea seems there.

I don't think I'm getting it. However, I have no problem with you adding a followup to add the link.
Comment 41 Mark Tompsett 2015-07-18 04:37:50 UTC
Sorry, I was unclear. This UI is not consistent with other UIs already in Koha and was initially confusing to me.

For example, the library and groups page is a data table with edit/delete on the rows, and a new library button which goes to a different template page to enter. That secondary page has a cancel link which goes back.

Again, apologies for being half awake when trying to explain my issues. :)
Comment 42 Kyle M Hall 2015-11-03 11:54:52 UTC Comment hidden (obsolete)
Comment 43 Nick Clemens 2015-11-17 21:06:48 UTC
Small conflict in a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
(from addition of audio alerts)

Bigger issue, I can't get it to save the chosen SMS provider on the borrower screen
Comment 44 Kyle M Hall 2015-11-25 16:05:54 UTC Comment hidden (obsolete)
Comment 45 Nick Clemens 2015-11-30 21:32:29 UTC
I can't get SMS provider to save upon edit, and changing it through DB I didn't get the email
Comment 46 Kyle M Hall 2015-12-01 15:57:40 UTC
(In reply to Nick Clemens from comment #45)
> I can't get SMS provider to save upon edit, and changing it through DB I
> didn't get the email

I can't reproduce your issue. Did you run updatedatabase.pl? Have you verified your server can send outgoing email successfully?

Kyle
Comment 47 Nick Clemens 2015-12-02 21:38:36 UTC
The issue is that the Koha/Schema/Result files are not automatically updated (so ModMember wasn't even looking to update the sms_rpovider_id column) , per discussion in koha irc:

<pianohacker> What's the current procedure for patches that use Koha::Database on tables they introduce? Is the patch expected to include the new autogenerated files in Koha/Schema/Result, to ease testing?
<cait> pianohacker: you can, but please in a separate patch
<cait> easier when rebasing and easier for th etester, because they don't need to remember to run the script
<pianohacker> cait: makes sense. 
<cait> and makes it sandbox testable
Comment 48 Mark Tompsett 2015-12-31 21:11:24 UTC
This reminds me of http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7567#c107:

This was generated by:
Reset hard to master.
Restore old DB
Apply the patches ...
./installer/data/mysql/updatedatabase.pl
./misc/devel/update_dbix_class_files.pl -db_name=... -db_user=... -db_passwd=...
git add Koha/Schema/Results/...
Comment 49 Mark Tompsett 2015-12-31 21:27:20 UTC Comment hidden (obsolete)
Comment 50 Mark Tompsett 2015-12-31 21:54:28 UTC Comment hidden (obsolete)
Comment 51 Mark Tompsett 2015-12-31 21:57:23 UTC Comment hidden (obsolete)
Comment 52 Mark Tompsett 2015-12-31 22:40:52 UTC
EnhancedMessagingPreferences! DOH!
Test plans that assume person is completely naive are so much nicer.
Comment 53 Mark Tompsett 2016-01-01 02:28:04 UTC
Also, make sure there are SMS letters (notices and slips).
Comment 54 Mark Tompsett 2016-01-01 05:19:58 UTC
HA HA! Email configured well enough. Patch applies cleanly. I believe it tests well now. I'm signing off both, but since I wrote the Schema patch, I'd like another sign off.
Comment 55 Mark Tompsett 2016-01-01 05:35:54 UTC Comment hidden (obsolete)
Comment 56 Mark Tompsett 2016-01-01 05:47:12 UTC Comment hidden (obsolete)
Comment 57 Mark Tompsett 2016-01-01 05:47:20 UTC Comment hidden (obsolete)
Comment 58 Mark Tompsett 2016-01-01 05:47:32 UTC Comment hidden (obsolete)
Comment 59 Mark Tompsett 2016-01-01 05:50:33 UTC
For Canadians using Rogers:
Rogers   phonenumber@pcs.rogers.com
See step 5 in comment #4 for wider context.
Comment 60 Mark Tompsett 2016-01-21 15:01:54 UTC Comment hidden (obsolete)
Comment 61 Mark Tompsett 2016-01-21 15:02:07 UTC Comment hidden (obsolete)
Comment 62 Mark Tompsett 2016-01-21 15:02:19 UTC Comment hidden (obsolete)
Comment 63 Mark Tompsett 2016-01-21 15:18:11 UTC Comment hidden (obsolete)
Comment 64 Mark Tompsett 2016-01-21 15:18:20 UTC Comment hidden (obsolete)
Comment 65 Mark Tompsett 2016-01-21 15:18:29 UTC Comment hidden (obsolete)
Comment 66 Mark Tompsett 2016-01-21 18:54:16 UTC
Given that some of these patches are mine, that is why it was Needs Signoff. Setting back.
Comment 67 Kyle M Hall 2016-01-27 13:18:55 UTC Comment hidden (obsolete)
Comment 68 Kyle M Hall 2016-01-27 13:19:04 UTC Comment hidden (obsolete)
Comment 69 Jonathan Druart 2016-02-09 09:40:27 UTC
My cellular provider does not provide this service, I am not able to test that the whole workflow works correctly.
A few feedbacks anyway:
1/ It would be great to provide a Koha::Objects implementation for Koha::SMS::Provider
2/ SMSSendDriver is passed to the template in admin-home.pl, it's not necessary (use TT plugin instead)
3/ sms_providers.pl: use strict;use warnings; => use Modern::Perl;
4/ the ENGINE for the new table is not correct in the atomic update entry.
5/ You are create an index on a FK, it's not necessary:
https://dev.mysql.com/doc/refman/5.7/en/create-table-foreign-keys.html
Search for "Such an index is created on the referencing table automatically if it does not exist."
6/ When editing a patron, should not we hide the "sms provider" part if the sms number is not filled?
7/ When editing a provider, the selected line has a red background. We have the same behavior on smart-rules.pl and the background use is orange. It would make sense to have the same color.

Marked as Failed QA for 2, 3, 4, 5 and 7
Comment 70 Kyle M Hall 2016-02-09 15:48:36 UTC Comment hidden (obsolete)
Comment 71 Kyle M Hall 2016-02-09 15:48:46 UTC Comment hidden (obsolete)
Comment 72 Kyle M Hall 2016-02-09 15:48:50 UTC Comment hidden (obsolete)
Comment 73 Kyle M Hall 2016-02-09 15:48:54 UTC Comment hidden (obsolete)
Comment 74 Kyle M Hall 2016-02-09 15:48:58 UTC Comment hidden (obsolete)
Comment 75 Jonathan Druart 2016-02-10 09:51:39 UTC
I get
Can't use string ("Koha::SMS::Provider") as a HASH ref while "strict refs" in use at /home/koha/src/Koha/Object.pm line 248.

on members/memberentry.pl

You must also add the new DB column to deletedborrowers.
Comment 76 Jonathan Druart 2016-02-10 09:52:36 UTC
And a warning message should appear if you try to delete provider used by patrons.
Comment 77 Kyle M Hall 2016-02-10 13:46:40 UTC Comment hidden (obsolete)
Comment 78 Kyle M Hall 2016-02-10 13:46:52 UTC Comment hidden (obsolete)
Comment 79 Kyle M Hall 2016-02-10 13:57:34 UTC Comment hidden (obsolete)
Comment 80 Kyle M Hall 2016-02-10 13:57:43 UTC Comment hidden (obsolete)
Comment 81 Kyle M Hall 2016-02-10 14:00:00 UTC
Jonathan, I do believe these latest followups address all your concerns!
Comment 82 Jonathan Druart 2016-02-12 13:00:30 UTC
Kyle, please provide tests for the 2 new modules.
See t/db_dependent/Koha/Cities.t for a generic example.
You will need to cover the new patrons_using method as well.
Comment 83 Jonathan Druart 2016-02-12 13:13:51 UTC
Since I won't be able to test the whole workflow, I would prefer to either get a signoff on this new patchset or let another QAer continues with it.
Comment 84 Kyle M Hall 2016-02-12 15:19:59 UTC
(In reply to Jonathan Druart from comment #83)
> Since I won't be able to test the whole workflow, I would prefer to either
> get a signoff on this new patchset or let another QAer continues with it.

I will work on the unit tests and try to find someone to re-sign this patch set.
Comment 85 Kyle M Hall 2016-02-12 15:31:38 UTC Comment hidden (obsolete)
Comment 86 Mark Tompsett 2016-02-12 16:27:38 UTC
Comment on attachment 47133 [details] [review]
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers

Review of attachment 47133 [details] [review]:
-----------------------------------------------------------------

::: admin/sms_providers.pl
@@ +41,5 @@
> +
> +my $op     = $cgi->param('op');
> +my $id     = $cgi->param('id');
> +my $name   = $cgi->param('name');
> +my $domain = $cgi->param('domain');

It might be an idea to add '// q{}' to the end of these.
Comment 87 Kyle M Hall 2016-02-12 19:51:21 UTC Comment hidden (obsolete)
Comment 88 Mark Tompsett 2016-02-12 20:03:43 UTC
Multi-commit bugs are a pain to get through. Thanks for the effort, Kyle.
Applies cleanly.
Affected test files run.
Pretty color use. :)
A nice simple elegance to the SMS Provider list.
Thanks for the follow up about the additional message. I'll let QA argue over the exact wording.
This works well!
Comment 89 Mark Tompsett 2016-02-12 20:05:34 UTC Comment hidden (obsolete)
Comment 90 Mark Tompsett 2016-02-12 20:06:00 UTC Comment hidden (obsolete)
Comment 91 Mark Tompsett 2016-02-12 20:06:22 UTC Comment hidden (obsolete)
Comment 92 Mark Tompsett 2016-02-12 20:06:52 UTC Comment hidden (obsolete)
Comment 93 Mark Tompsett 2016-02-12 20:07:09 UTC Comment hidden (obsolete)
Comment 94 Mark Tompsett 2016-02-12 20:07:27 UTC Comment hidden (obsolete)
Comment 95 Mark Tompsett 2016-02-12 20:07:48 UTC Comment hidden (obsolete)
Comment 96 Mark Tompsett 2016-02-12 20:08:05 UTC Comment hidden (obsolete)
Comment 97 Mark Tompsett 2016-02-12 20:08:30 UTC Comment hidden (obsolete)
Comment 98 Mark Tompsett 2016-02-12 20:08:53 UTC Comment hidden (obsolete)
Comment 99 Mark Tompsett 2016-02-12 20:09:09 UTC Comment hidden (obsolete)
Comment 100 Mark Tompsett 2016-02-12 20:09:25 UTC Comment hidden (obsolete)
Comment 101 Jonathan Druart 2016-02-15 16:29:15 UTC
Created attachment 48052 [details] [review]
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers

Nearly all cellular providers allow a person to send an text message to a cellular
phone by sending an email to phonenumber@provider. We can leverage this capability
to add the ability for Koha to send sms messages to patrons without the need to
subscribe to an sms gateway server.

Basic plan:
1. Add a table sms_providers to the db to tell Koha what service providers are available, and what domain emails should be sent to.
2. Add borrowers.sms_provider_id to tell Koha which mobile service the patron subscribes to for the number given in smsalertnumber
3. Modify Koha to send an email rather than using SMS::Send if the driver is set to 'Email'

Test plan:
0) Get a mobile phone
1) Apply the patch
2) Run updatedatabase.pl
3) Set the value of SMSSendDriver to 'Email'
4) Go to the admin page, the "Additional parameters" area should now have the link "SMS cellular providers"
5) On this page, add some providers. Make sure to add the provider for your own cellular phone service.

Here are some examples:
Sprint   phonenumber@messaging.sprintpcs.com
Verizon  phonenumber@vtext.com
T-Mobile phonenumber@tmomail.net
AT&T     phonenumber@txt.att.net

Only add the domain part in the 'domain' field. So for Verizon, that would be 'vtext.com'

6) Create an account for yourself, add your SMS number, and select your provider from the dropdown box directly below it.

7) Enable SMS messaging for Item check-in and Item checkout
8) Check out an item to yourself
9) Run process_message_queue.pl
10) Wait! You should receive a text message shortly, when I tested it, I received my sms message within the minute.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 102 Jonathan Druart 2016-02-15 16:29:21 UTC
Created attachment 48053 [details] [review]
Bug 9021: Schema update

This ensures that the DBIx structure matches the SQL structure changes.
See comment #48 as to how this was generated.
Also, I had to modify misc/devel/update_dbix_class_files.pl
to have an "overwrite_modifications => 1" option to get it to generate.
This should correct issues raised in comment #45.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 103 Jonathan Druart 2016-02-15 16:29:25 UTC
Created attachment 48054 [details] [review]
Bug 9021: Flag issues

Check in and check out were failing for me.
Specificly, the $borrower->{flags}->{...} was not accessible as
a hash, so I put a hash ref check around the code that would fail.

TEST PLAN
---------
1) Attempt a checkout
   -- blows up with "1" not being allowed as a hash ref.
2) Apply patch
3) Attempt same checkout again
   -- success
4) prove -v t/db_dependent/Circulation_dateexpiry.t
   -- this triggers CanBookBeIssued
   -- this should succeed
5) prove -v t/db_dependent/rollingloans.t
   -- mine skipped the tests, but if configured, it
      should also trigger and succeed.
6) run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 104 Jonathan Druart 2016-02-15 16:29:31 UTC
Created attachment 48055 [details] [review]
Bug 9021 [QA Followup] - Use TT plugin instead of passing syspref via script

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 105 Jonathan Druart 2016-02-15 16:29:36 UTC
Created attachment 48056 [details] [review]
Bug 9021 [QA Followup] - Use Modern::Perl

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 106 Jonathan Druart 2016-02-15 16:29:41 UTC
Created attachment 48057 [details] [review]
Bug 9021 [QA Followup] - Fix ENGINE, don't create index on FK

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 107 Jonathan Druart 2016-02-15 16:29:45 UTC
Created attachment 48058 [details] [review]
Bug 9021 [QA Followup] - Use same color as circ rules editor for row highlighting

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 108 Jonathan Druart 2016-02-15 16:29:51 UTC
Created attachment 48059 [details] [review]
Bug 9021 [QA Followup] - Switch to Koha::Object(s)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 109 Jonathan Druart 2016-02-15 16:29:56 UTC
Created attachment 48060 [details] [review]
Bug 9021 [QA Followup] - Add feedback to delete button if provider is being used

* Change links to buttons
* Add warning class to delete button if provider is being used

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 110 Jonathan Druart 2016-02-15 16:30:02 UTC
Created attachment 48061 [details] [review]
Bug 9021 [QA Followup] - Add column to deleted borrowers, set null on provider deletion

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 111 Jonathan Druart 2016-02-15 16:30:08 UTC
Created attachment 48062 [details] [review]
Bug 9021 [QA Followup] - Unit tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 112 Jonathan Druart 2016-02-15 16:30:17 UTC
Created attachment 48063 [details] [review]
Bug 9021 [QA Followup] - Add additional message to deletion warning if provider is in use.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 113 Jonathan Druart 2016-02-15 16:30:22 UTC
Created attachment 48064 [details] [review]
Bug 9021: Fix conflict with bug 15446 (type vs _type)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 114 Jonathan Druart 2016-02-15 16:30:27 UTC Comment hidden (obsolete)
Comment 115 Jonathan Druart 2016-02-15 16:32:13 UTC
Created attachment 48066 [details] [review]
Bug 9021: Save the provider even if the sms number is not modified

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 116 Kyle M Hall 2016-02-16 15:32:24 UTC
Pushed to Master - Should be in the May 2016 3.24 release!
Comment 117 Mason James 2017-05-24 02:16:33 UTC
(In reply to Kyle M Hall from comment #116)
> Pushed to Master - Should be in the May 2016 3.24 release!

Enhancement, skipping for 16.05.x
Comment 118 Mason James 2017-05-24 02:19:41 UTC
(In reply to Mason James from comment #117)
> (In reply to Kyle M Hall from comment #116)
> > Pushed to Master - Should be in the May 2016 3.24 release!
> 
> Enhancement, skipping for 16.05.x

oups, patchset is already added to 16.5.x :0)