Bug 33191 - AutoEmailPrimaryAddress options don't match labels in memberentry
Summary: AutoEmailPrimaryAddress options don't match labels in memberentry
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Caroline Cyr La Rose
QA Contact: Marcel de Rooy
URL:
Keywords: Academy
Depends on: 33192
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-10 08:34 UTC by Martin Renvoize
Modified: 2023-12-28 20:42 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement changes the wording of the choices in the EmailFieldPrimary system preference (formely AutoEmailPrimaryAddress) to match the patron form field names. The choices were changed like so: - 'home' is now called 'primary email' and refers to the email database column - 'work' is now called 'secondary email' and refers to the emailpro database column - 'alternate' is still called 'alternate email' and refers to the B_email database column - first valid and cardnumber did not change.
Version(s) released in:
23.05.00


Attachments
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry (2.11 KB, patch)
2023-03-10 20:19 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry (1.89 KB, patch)
2023-03-13 19:34 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry (1.96 KB, patch)
2023-03-14 11:06 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry (2.05 KB, patch)
2023-04-14 06:31 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2023-03-10 08:34:19 UTC
This preference is confusing as the options it contains don't all match the labels for the corresponding fields in the member entry forms.

* 'work'.. this corresponds to 'Secondary email'
* 'home'.. this corresponds to 'Primary email'
* 'alternate'.. ?

We should either hint what these fields 'mean' on the form or update the systempreference options to match the existing form field label?
Comment 1 Caroline Cyr La Rose 2023-03-10 20:09:54 UTC
Here is the corresponding field names

Current syspref choices | DB field | Field name in patronfields.inc
------------------------+----------+-------------------------------
 home                   | email    | Primary email
------------------------+----------+-------------------------------
 work                   | emailpro | Secondary email
------------------------+----------+-------------------------------
 alternate              | B_email  | Alternate email
Comment 2 Caroline Cyr La Rose 2023-03-10 20:19:16 UTC
Created attachment 148098 [details] [review]
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry

This patch changes the wording for the AutoEmailPrimaryAddress system
preference to make it clearer.

To test:
1. Go to Administration > Global system preferences
2. Search for AutoEmailPrimaryAddress
3. Read the sentence and choices, make sure it makes sense, grammar and
   spelling are correct
4. Click the link to AutoEmailNewUser, it should bring up the correct
   system preference
5. Optionally, try the different options, they should work as before
Comment 3 Caroline Cyr La Rose 2023-03-10 20:21:16 UTC
I submitted something. It only changes the wording of the preference. 

If you'd prefer the modal like BorrowerMandatoryField for example, that's a bit outside my knowledge, but I guess I could do some copy-paste and figure it out :)
Comment 4 Martin Renvoize 2023-03-10 20:37:24 UTC
Thanks Caroline, the select options change is perfect.  You've fallen into the same trap I did however regards linking the preference to AutoEmailNewUser.. in actual fact, this preference isn't that closely related to that preference, it applies to a lot more notices than just the welcome one.

I've actually opened a bug to rename this pref and also to expand it with yet another preference to govern the order of the 'first valid' option from here.

I'll take a deeper look on Monday with the aim of signing off. :)
Comment 5 Caroline Cyr La Rose 2023-03-10 21:17:18 UTC
Ok, maybe this bug should be the last in the series to be corrected then?

1st bug 33192
2nd bug 29046
3rd this
Comment 6 Martin Renvoize 2023-03-13 14:09:43 UTC
We may as well add in bug 18398 to the little tree that's building here too..

Perhaps we should also look at updateing the uses of first_valid_email listed above to also use notice_email_address as another bug in this set?
Comment 7 Caroline Cyr La Rose 2023-03-13 19:34:08 UTC
Created attachment 148141 [details] [review]
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry

This patch changes the wording for the EmailFieldPrimary system
preference to make it clearer.

To test:
1. Go to Administration > Global system preferences
2. Search for EmailFieldPrimary
3. Read the sentence and choices, make sure it makes sense, grammar and
   spelling are correct
4. Optionally, try the different options, they should work as before
Comment 8 Caroline Cyr La Rose 2023-03-13 19:35:15 UTC
Redid the choices on top of the name change (bug 33192)
Comment 9 Martin Renvoize 2023-03-14 11:06:06 UTC
Created attachment 148156 [details] [review]
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry

This patch changes the wording for the EmailFieldPrimary system
preference to make it clearer.

To test:
1. Go to Administration > Global system preferences
2. Search for EmailFieldPrimary
3. Read the sentence and choices, make sure it makes sense, grammar and
   spelling are correct
4. Optionally, try the different options, they should work as before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2023-03-14 11:07:43 UTC
Excellent, I think this all starts to become a lot more clear now :)
Comment 11 Marcel de Rooy 2023-04-14 06:31:41 UTC
Created attachment 149640 [details] [review]
Bug 33191: AutoEmailPrimaryAddress options don't match labels in memberentry

This patch changes the wording for the EmailFieldPrimary system
preference to make it clearer.

To test:
1. Go to Administration > Global system preferences
2. Search for EmailFieldPrimary
3. Read the sentence and choices, make sure it makes sense, grammar and
   spelling are correct
4. Optionally, try the different options, they should work as before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Tomás Cohen Arazi 2023-04-14 14:36:12 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 13 Matt Blenkinsop 2023-04-18 12:17:42 UTC
Not backporting to 22.11.x as bug 33192 is an enhancement and has not been backported

Nice work everyone!
Comment 14 David Cook 2023-05-03 04:15:40 UTC
I still wish that we'd done a better shift from home/work to primary/secondary overall. 

So many libraries use work/secondary emails as the most important email and Koha has made things so confusing over the years. Bug 18398, Bug 33223 and Bug 29046 go a long way to improving things.