Bug 35356

Summary: SMS number field shows on moremember.pl even when null
Product: Koha Reporter: Andrew Fuerste-Henry <andrewfh>
Component: PatronsAssignee: Lucas Gass <lucas>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle.m.hall, lucas, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.03
Attachments: Bug 35356: Show SMS labels only when data exists
Bug 35356: Show SMS labels only when data exists
Bug 35356: Show SMS labels only when data exists

Description Andrew Fuerste-Henry 2023-11-16 22:16:27 UTC
Generally, the patron record details on moremember.pl don't show the labels for fields for which there is no data -- for example, if your patron doesn't have an email address, we don't show the Email field at all. However, we're not consistent about this with SMS Number. If the SMSSendDriver syspref has a value, then every patron will show "SMS Number" under the messaging prefs table on moremember.pl, even if they don't have any value there.
Comment 1 Lucas Gass 2023-11-17 21:41:58 UTC
Created attachment 159114 [details] [review]
Bug 35356: Show SMS labels only when data exists

To test:
APPLY PATCH
1. Set SMSSendDriver = Email
2. Admin > SMS cellular providers, have at least 1.
3. Go to the members/moremember.pl
4. If the patron has no SMSnumber or SMS provider then niether of the labels should appear.
5. Add both a SMSnumber and SMS provider, make sure the data appears correctly on members/moremember.pl.
Comment 2 Andrew Fuerste-Henry 2023-11-17 21:52:38 UTC
Created attachment 159117 [details] [review]
Bug 35356: Show SMS labels only when data exists

To test:
APPLY PATCH
1. Set SMSSendDriver = Email
2. Admin > SMS cellular providers, have at least 1.
3. Go to the members/moremember.pl
4. If the patron has no SMSnumber or SMS provider then niether of the labels should appear.
5. Add both a SMSnumber and SMS provider, make sure the data appears correctly on members/moremember.pl.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Comment 3 Victor Grousset/tuxayo 2023-11-23 20:15:51 UTC
Created attachment 159214 [details] [review]
Bug 35356: Show SMS labels only when data exists

To test:
APPLY PATCH
1. Set SMSSendDriver = Email
2. Admin > SMS cellular providers, have at least 1.
3. Go to the members/moremember.pl
4. If the patron has no SMSnumber or SMS provider then niether of the labels should appear.
5. Add both a SMSnumber and SMS provider, make sure the data appears correctly on members/moremember.pl.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 4 Victor Grousset/tuxayo 2023-11-23 20:19:36 UTC
> Generally, the patron record details on moremember.pl don't show the labels for fields for which there is no data -- for example, if your patron doesn't have an email address, we don't show the Email field at all. However, we're not consistent about this with SMS Number

Even though, this really looks more like an enhancement.

Regardless, I noticed too late ^^ It works, makes sense, QA script happy, code looks good, passing QA :)
Comment 5 Katrin Fischer 2024-01-17 10:40:25 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-01-31 12:46:16 UTC
Small enhancement, I choose to backport

Pushed to 23.11.x for 23.11.03
Comment 7 Lucas Gass 2024-02-08 18:48:27 UTC
Enhancement, no backport for 23.05.x