Bug 20439 - SMS provider sorting
Summary: SMS provider sorting
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass (lukeg)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
: 26837 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-03-16 22:19 UTC by George Williams (NEKLS)
Modified: 2023-06-08 22:26 UTC (History)
12 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.05, 21.11.12
Circulation function:


Attachments
Bug 20439: Sort SMS providers in alphabetical order (2.22 KB, patch)
2022-07-11 20:03 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 20439: Sort SMS providers in alphabetical order (2.27 KB, patch)
2022-07-11 20:41 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 20439: Sort SMS providers in alphabetical order by DB field (2.12 KB, patch)
2022-07-15 16:57 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 20439: Sort SMS providers in alphabetical order by DB field (2.23 KB, patch)
2022-07-18 09:04 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description George Williams (NEKLS) 2018-03-16 22:19:56 UTC
On intranet memberentry.pl and on OPAC opac-messaging.pl the SMS provider drop-down is sorted in the order the provider was added rather than alphabetically by provider name - making it difficult for library staff and for borrowers to find providers not added in alphabetical order.
Comment 1 Lisette Scheer 2019-08-14 16:06:59 UTC
This is still an issue in 18.11
Comment 2 George Williams (NEKLS) 2020-11-24 21:07:39 UTC
*** Bug 26837 has been marked as a duplicate of this bug. ***
Comment 3 Lucas Gass (lukeg) 2022-07-11 20:03:39 UTC
Created attachment 137579 [details] [review]
Bug 20439: Sort SMS providers in alphabetical order

To test:
1/ Add 'Email' to the 'SMSSendDriver' system preference.
2/ Make sure 'EnhancedMessagingPreferencesOPAC' and 'EnhancedMessagingPreferences' are turned on.
3/ Add some SMS providers (/cgi-bin/koha/admin/sms_providers.pl) with different names.
4/ Notice on memberentry.pl and opac-messaging.pl the SMS providers sort by when they were added, not alphabetically.
5/ Apply patch and restart services.
6/ Look at memberentry.pl and opac-messaging.pl and notice that they SMS providers now sort alphabetically.
Comment 4 ByWater Sandboxes 2022-07-11 20:41:31 UTC
Created attachment 137590 [details] [review]
Bug 20439: Sort SMS providers in alphabetical order

To test:
1/ Add 'Email' to the 'SMSSendDriver' system preference.
2/ Make sure 'EnhancedMessagingPreferencesOPAC' and 'EnhancedMessagingPreferences' are turned on.
3/ Add some SMS providers (/cgi-bin/koha/admin/sms_providers.pl) with different names.
4/ Notice on memberentry.pl and opac-messaging.pl the SMS providers sort by when they were added, not alphabetically.
5/ Apply patch and restart services.
6/ Look at memberentry.pl and opac-messaging.pl and notice that they SMS providers now sort alphabetically.

Signed-off-by: George Williams <george@nekls.org>
Comment 5 Martin Renvoize (ashimema) 2022-07-15 15:37:21 UTC
Shouldn't this be sorted by DB field in the query Lucas, rather than after the fact in perl?
Comment 6 Lucas Gass (lukeg) 2022-07-15 16:57:01 UTC
Created attachment 137786 [details] [review]
Bug 20439: Sort SMS providers in alphabetical order by DB field

To test:
1/ Add 'Email' to the 'SMSSendDriver' system preference.
2/ Make sure 'EnhancedMessagingPreferencesOPAC' and 'EnhancedMessagingPreferences' are turned on.
3/ Add some SMS providers (/cgi-bin/koha/admin/sms_providers.pl) with different names.
4/ Notice on memberentry.pl and opac-messaging.pl the SMS providers sort by when they were added, not alphabetically.
5/ Apply patch and restart services.
6/ Look at memberentry.pl and opac-messaging.pl and notice that they SMS providers now sort alphabetically.
Comment 7 Martin Renvoize (ashimema) 2022-07-16 09:21:23 UTC
Awesome, thanks Lucas. I'll take a look at straight QAing this on Monday.. unless someone gets a signoff in in the mean time :-)
Comment 8 Martin Renvoize (ashimema) 2022-07-18 09:04:19 UTC
Created attachment 137800 [details] [review]
Bug 20439: Sort SMS providers in alphabetical order by DB field

To test:
1/ Add 'Email' to the 'SMSSendDriver' system preference.
2/ Make sure 'EnhancedMessagingPreferencesOPAC' and 'EnhancedMessagingPreferences' are turned on.
3/ Add some SMS providers (/cgi-bin/koha/admin/sms_providers.pl) with different names.
4/ Notice on memberentry.pl and opac-messaging.pl the SMS providers sort by when they were added, not alphabetically.
5/ Apply patch and restart services.
6/ Look at memberentry.pl and opac-messaging.pl and notice that they SMS providers now sort alphabetically.

Signed-off-by: George Williams <george@nekls.org
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize (ashimema) 2022-07-18 09:04:42 UTC
Great work, works as expected

Passing QA
Comment 10 Tomás Cohen Arazi (tcohen) 2022-07-18 17:55:38 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 11 Lucas Gass (lukeg) 2022-08-23 19:25:49 UTC
Backported to 22.05.x for 22.05.05
Comment 12 George Williams (NEKLS) 2022-08-23 19:42:02 UTC
If this could be backported to 21.11, that would be awesome.
Comment 13 Arthur Suzuki 2022-08-30 09:23:37 UTC
thx pushed to 21.11.x for 21.11.12
Comment 14 Victor Grousset/tuxayo 2022-09-14 19:09:21 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.