Bug 26299

Summary: Help text for OPAC SMS number should be less North American-centric
Product: Koha Reporter: David Cook <dcook>
Component: OPACAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: alexis.ripetti, amit.gupta, amitddng135, jonathan.druart, lucas, nick
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26285
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25520
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Circulation function:
Attachments: Bug 26299: Use same SMS number help text in OPAC as staff interface
Bug 26299: Use same SMS number help text in OPAC as staff interface
Bug 26299: Use same SMS number help text in OPAC as staff interface
Bug 26299: Use same SMS number help text in OPAC as staff interface
Bug 26299: Use same SMS number help text in OPAC as staff interface
Bug 26299: Use same SMS number help text in OPAC as staff interface

Description David Cook 2020-08-26 04:05:09 UTC
At the moment, the help text on opac-messaging.pl is "Please enter numbers only. (123) 456-7890 would be entered as 1234567890."

The first style is a North American style, which looks strange to people from other countries like Australia where we frequently format non-mobile phone numbers like 02 5555 5555 or mobile numbers like 0455 555 555. 

We should use a more generic style like we do on memberentry.pl when we say "SMS number should be in the format 1234567890 or +11234567890"
Comment 1 David Cook 2020-08-26 04:11:39 UTC
Created attachment 109136 [details] [review]
Bug 26299: Use same SMS number help text in OPAC as staff interface

The SMS number help text in the OPAC follows a North American phone
number style. It should be more generic. To that end, this patch
makes the OPAC use the same help text for SMS numbers as
the staff interface

To test:
1) Apply the patch
2) Set "SMSSendDriver" to "Anything" in global system preferences
3) Go to the following link and note the help text by SMS number
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
4) Go to http://localhost:8080/cgi-bin/koha/opac-messaging.pl
5) Note that the help text in both interfaces uses the same wording
Comment 2 Amit Gupta 2020-08-26 14:44:30 UTC
Created attachment 109183 [details] [review]
Bug 26299: Use same SMS number help text in OPAC as staff  interface

To test:
1) Apply the patch
2) Set "SMSSendDriver" to "Anything" in global system preferences
3) Go to the following link and note the help text by SMS number
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
4) Go to http://localhost:8080/cgi-bin/koha/opac-messaging.pl
5) Note that the help text in both interfaces uses the same wording

Checked and working perfectly.
Comment 3 Katrin Fischer 2020-08-26 18:51:51 UTC
Created attachment 109191 [details] [review]
Bug 26299: Use same SMS number help text in OPAC as staff interface

The SMS number help text in the OPAC follows a North American phone
number style. It should be more generic. To that end, this patch
makes the OPAC use the same help text for SMS numbers as
the staff interface

To test:
1) Apply the patch
2) Set "SMSSendDriver" to "Anything" in global system preferences
3) Go to the following link and note the help text by SMS number
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
4) Go to http://localhost:8080/cgi-bin/koha/opac-messaging.pl
5) Note that the help text in both interfaces uses the same wording

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2020-08-31 13:04:18 UTC
Nick, are you ok with this?
Comment 5 David Cook 2020-08-31 23:42:02 UTC
(In reply to Jonathan Druart from comment #4)
> Nick, are you ok with this?

Alternatively, we could provide a printf pattern for rendering the numbers in a more localized way I suppose? Seems like Template::Toolkit has a few options on that front.

Since the OPAC is public-facing, I could see wanting to make it seem more polished than the Staff Interface...
Comment 6 Nick Clemens (kidclamp) 2020-09-01 10:00:28 UTC
(In reply to Jonathan Druart from comment #4)
> Nick, are you ok with this?

I checked with our educators - their concern is that it not start with 1, which is the indicator of 'long distance' calls here.

9785550123 would be better as it won't end up being a real phone number
https://en.wikipedia.org/wiki/555_(telephone_number)
Comment 7 David Cook 2020-09-02 04:53:54 UTC
(In reply to Nick Clemens from comment #6)
> (In reply to Jonathan Druart from comment #4)
> > Nick, are you ok with this?
> 
> I checked with our educators - their concern is that it not start with 1,
> which is the indicator of 'long distance' calls here.
> 
> 9785550123 would be better as it won't end up being a real phone number
> https://en.wikipedia.org/wiki/555_(telephone_number)

That's an interesting point. 

Maybe we should just change the wording (in both interfaces) to something like...

"Please enter numbers only. Prefix the number with + if including the country code."

After that, the Javascript validation messages should provide enough formatting information?
Comment 8 David Cook 2020-09-02 04:55:42 UTC
I mention the + in part because I don't think we actually mention that anywhere.
Comment 9 Jonathan Druart 2020-09-03 11:28:41 UTC
(In reply to David Cook from comment #7)
> (In reply to Nick Clemens from comment #6)
> > (In reply to Jonathan Druart from comment #4)
> > > Nick, are you ok with this?
> > 
> > I checked with our educators - their concern is that it not start with 1,
> > which is the indicator of 'long distance' calls here.
> > 
> > 9785550123 would be better as it won't end up being a real phone number
> > https://en.wikipedia.org/wiki/555_(telephone_number)
> 
> That's an interesting point. 
> 
> Maybe we should just change the wording (in both interfaces) to something
> like...
> 
> "Please enter numbers only. Prefix the number with + if including the
> country code."
> 
> After that, the Javascript validation messages should provide enough
> formatting information?

I think this is the best solution.
Comment 10 Nick Clemens (kidclamp) 2020-09-03 13:35:44 UTC
Created attachment 109625 [details] [review]
Bug 26299: Use same SMS number help text in OPAC as staff interface

The SMS number help text in the OPAC follows a North American phone
number style. It should be more generic. To that end, this patch
makes the OPAC use the same help text for SMS numbers as
the staff interface

To test:
1) Apply the patch
2) Set "SMSSendDriver" to "Anything" in global system preferences
3) Go to the following link and note the help text by SMS number
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
4) Go to http://localhost:8080/cgi-bin/koha/opac-messaging.pl
5) Note that the help text in both interfaces uses the same wording
Comment 11 Alexis Ripetti 2020-09-04 15:00:47 UTC
Created attachment 109667 [details] [review]
Bug 26299: Use same SMS number help text in OPAC as staff interface

The SMS number help text in the OPAC follows a North American phone
number style. It should be more generic. To that end, this patch
makes the OPAC use the same help text for SMS numbers as
the staff interface

To test:
1) Apply the patch
2) Set "SMSSendDriver" to "Anything" in global system preferences
3) Go to the following link and note the help text by SMS number
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
4) Go to http://localhost:8080/cgi-bin/koha/opac-messaging.pl
5) Note that the help text in both interfaces uses the same wording

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Comment 12 Katrin Fischer 2020-09-12 18:46:00 UTC
Created attachment 109991 [details] [review]
Bug 26299: Use same SMS number help text in OPAC as staff interface

The SMS number help text in the OPAC follows a North American phone
number style. It should be more generic. To that end, this patch
makes the OPAC use the same help text for SMS numbers as
the staff interface

To test:
1) Apply the patch
2) Set "SMSSendDriver" to "Anything" in global system preferences
3) Go to the following link and note the help text by SMS number
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=51
4) Go to http://localhost:8080/cgi-bin/koha/opac-messaging.pl
5) Note that the help text in both interfaces uses the same wording

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Jonathan Druart 2020-10-01 09:45:19 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 14 Lucas Gass (lukeg) 2020-10-20 17:36:04 UTC
enhancement will not be backported to 20.05.x