Bug 25364

Summary: Add "Other" to the gender options in a patron record
Product: Koha Reporter: David Roberts <david.roberts>
Component: PatronsAssignee: David Roberts <david.roberts>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, julian.maurice, kyle.m.hall, lucas, sally.healey
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23609
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10950
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27540
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 35531    
Attachments: Bug 25364: Add "Other" to the gender options in a patron record
Bug 25364: Add "Other" to the gender options in a patron record
Bug 25364: Add "Other" to the gender options in a patron record
Bug 25364: Add "Other" to the gender options in a patron record
Bug 25364: Add "Other" to the gender options in a patron record
Bug 25364: Add "Other" to the gender options in a patron record
Bug 25364: Undo change to 'None specified'

Description David Roberts 2020-05-04 02:28:24 UTC
Almost all new installs require us (PTFS Europe) to modify the wording on the Gender options in a patron record in order to meet the requirements of users. I propose that changing the three options ("Female", "Male" and "None specified") to ("Female", "Male", "Other" and "None specified / Prefer not to say") would help avoid these problems.
Comment 1 David Roberts 2020-05-04 02:32:20 UTC
Created attachment 104245 [details] [review]
Bug 25364: Add "Other" to the gender options in a patron record

This patch adds "Other" as an option, and also changes the wording of
"None specified" slightly.

To test:

1) Apply the patch
2) Check that there is an "Other" radio button in the patron record, and
that the wording of "None specified" has changed to "None specified /
Prefer not to say".
3) Check that you can save changes to the gender of this patron record,
both on create and modify.
4) Check that these changes also work in the Opac Self-Registration
functionality.
Comment 2 David Roberts 2020-05-04 02:45:22 UTC
Annoyingly, I've just found https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23609 which is probably a better long-term solution. However, I stand by this as a short-term easy fix.
Comment 3 Sally 2020-05-06 09:20:47 UTC
Hi David,

+1 on the idea.

Creating a new patron and editing an existing patron in the OPAC both work correctly, but I get a fault in the Staff Client.

To replicate:

Create or edit a patron account and set their Gender to: 'Other'
Check the Details tab - it correctly says:  Gender:  Other
Edit the patron
The selection has automatically switched to the radio button for 'None specified / Prefer not to say' rather than staying in 'Other'
Comment 4 David Roberts 2020-05-06 20:11:06 UTC
Created attachment 104454 [details] [review]
Bug 25364: Add "Other" to the gender options in a patron record

This patch adds "Other" as an option, and also changes the wording of
"None specified" slightly.

To test:

1) Apply the patch
2) Check that there is an "Other" radio button in the patron record, and
that the wording of "None specified" has changed to "None specified /
Prefer not to say".
3) Check that you can save changes to the gender of this patron record,
both on create and modify.
4) Check that these changes also work in the Opac Self-Registration
functionality.
Comment 5 David Roberts 2020-05-06 20:12:21 UTC
(In reply to Sally from comment #3)
> Hi David,
> 
> +1 on the idea.
> 
> Creating a new patron and editing an existing patron in the OPAC both work
> correctly, but I get a fault in the Staff Client.
> 
> To replicate:
> 
> Create or edit a patron account and set their Gender to: 'Other'
> Check the Details tab - it correctly says:  Gender:  Other
> Edit the patron
> The selection has automatically switched to the radio button for 'None
> specified / Prefer not to say' rather than staying in 'Other'

Thanks Sally, that was a good catch. Please could you have another go now? Fingers crossed it will work OK this time!
Comment 6 Owen Leonard 2020-05-07 13:00:13 UTC
(In reply to Sally from comment #3)

> The selection has automatically switched to the radio button for 'None
> specified / Prefer not to say' rather than staying in 'Other'

I still encounter this problem.
Comment 7 David Roberts 2020-05-07 15:18:08 UTC
(In reply to Owen Leonard from comment #6)
> (In reply to Sally from comment #3)
> 
> > The selection has automatically switched to the radio button for 'None
> > specified / Prefer not to say' rather than staying in 'Other'
> 
> I still encounter this problem.

That's really weird - it works OK for me. I wonder what I've done wrong.
Comment 8 David Roberts 2020-05-07 15:37:42 UTC
(In reply to David Roberts from comment #7)
> (In reply to Owen Leonard from comment #6)
> > (In reply to Sally from comment #3)
> > 
> > > The selection has automatically switched to the radio button for 'None
> > > specified / Prefer not to say' rather than staying in 'Other'
> > 
> > I still encounter this problem.
> 
> That's really weird - it works OK for me. I wonder what I've done wrong.

It works OK for me on the ByWater Sandbox as well - there's a problem on the PTFS sandboxes, but I think that's a problem with the sandboxes, not the patch because it's exploding about 1 minute into provisioning a new instance and doesn't actually apply the patch.
Comment 9 David Roberts 2020-05-07 15:43:09 UTC
I'm going to mark this back to needing sign-off as it works OK on the sandboxes (as far as I can see).
Comment 10 Sally 2020-05-07 15:45:52 UTC
In curious timing, I just applied it to a PTFS Sandbox and it works perfectly - the logs look ok, and the patch works.  Tested in both Chrome and Firefox.

I'm happy to add my sign off - Owen, did you want to see if it now works for you?
Comment 11 PTFS Europe Sandboxes 2020-05-07 15:46:25 UTC
Created attachment 104523 [details] [review]
Bug 25364: Add "Other" to the gender options in a patron record

This patch adds "Other" as an option, and also changes the wording of
"None specified" slightly.

To test:

1) Apply the patch
2) Check that there is an "Other" radio button in the patron record, and
that the wording of "None specified" has changed to "None specified /
Prefer not to say".
3) Check that you can save changes to the gender of this patron record,
both on create and modify.
4) Check that these changes also work in the Opac Self-Registration
functionality.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 12 Katrin Fischer 2020-05-08 06:47:19 UTC
I am really happy to see this patch because I think we can do better there. In Germany the official third option is 'diverse' (hopefully translated correctly). I wonder if we could add classes or similar so 'Other' could be easily changed. In translation "Other" will cause a bit of trouble, as there is tons of 'other' in other contexts (if you don't do anything, we only get 1 translation of each identical string)
Comment 13 David Roberts 2020-05-08 14:35:43 UTC
(In reply to Katrin Fischer from comment #12)
> I am really happy to see this patch because I think we can do better there.
> In Germany the official third option is 'diverse' (hopefully translated
> correctly). I wonder if we could add classes or similar so 'Other' could be
> easily changed. In translation "Other" will cause a bit of trouble, as there
> is tons of 'other' in other contexts (if you don't do anything, we only get
> 1 translation of each identical string)

Hi Katrin

That should be possible - but you can actually already change it pretty easily with the following jquery:

$("#memberentry_identity label[for='sex-other']").html("Diverse ");

I wonder if it might be worth adding classes to all the other gender options as well while I'm at it.
Comment 14 David Roberts 2020-05-08 14:41:28 UTC
Forget that, that jQuery hides the radio button! I'll add some classes.
Comment 15 David Roberts 2020-05-08 19:27:43 UTC
Created attachment 104614 [details] [review]
Bug 25364: Add "Other" to the gender options in a patron record

This patch adds "Other" as an option, and also changes the wording of
"None specified" slightly.

To test:

1) Apply the patch
2) Check that there is an "Other" radio button in the patron record, and
that the wording of "None specified" has changed to "None specified /
Prefer not to say".
3) Check that you can save changes to the gender of this patron record,
both on create and modify.
4) Check that these changes also work in the Opac Self-Registration
functionality.
Comment 16 David Roberts 2020-05-08 19:33:33 UTC
Created attachment 104617 [details] [review]
Bug 25364: Add "Other" to the gender options in a patron record

This patch adds "Other" as an option, and also changes the wording of
"None specified" slightly.

To test:

1) Apply the patch
2) Check that there is an "Other" radio button in the patron record, and
that the wording of "None specified" has changed to "None specified /
Prefer not to say".
3) Check that you can save changes to the gender of this patron record,
both on create and modify.
4) Check that these changes also work in the Opac Self-Registration
functionality.

Correct typos in previous commit
Comment 17 David Roberts 2020-05-08 21:43:53 UTC
I've now added the classes and I've set this back to Needs Signoff (wasn't sure if that was necessary or not!)
Comment 18 Katrin Fischer 2020-05-09 17:48:02 UTC
Hi David, if something is signed off already, you can do a separate follow-up patch. This way the sign-off on the first patch can still be counted and we can see that only small changes have been made.
Comment 19 Katrin Fischer 2020-05-09 17:48:11 UTC
Also: Thank you!
Comment 20 David Roberts 2020-05-09 17:49:55 UTC
(In reply to Katrin Fischer from comment #18)
> Hi David, if something is signed off already, you can do a separate
> follow-up patch. This way the sign-off on the first patch can still be
> counted and we can see that only small changes have been made.

Thanks - I'd carefully tidied up after myself and merged patches! Your way sounds a lot easier, so I'll do it your way next time :-)
Comment 21 Devinim 2020-05-20 19:05:06 UTC
Created attachment 105162 [details] [review]
Bug 25364: Add "Other" to the gender options in a patron record

This patch adds "Other" as an option, and also changes the wording of
"None specified" slightly.

To test:

1) Apply the patch
2) Check that there is an "Other" radio button in the patron record, and
that the wording of "None specified" has changed to "None specified /
Prefer not to say".
3) Check that you can save changes to the gender of this patron record,
both on create and modify.
4) Check that these changes also work in the Opac Self-Registration
functionality.

Correct typos in previous commit

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Comment 22 Julian Maurice 2020-07-03 08:50:55 UTC
Hi David,

Can you explain why "None specified" needed to be changed ?
If one prefers not to say their gender, then it remains unspecified :) I fail to see the added value here.
Also remember that every string change is additional work for translators.
Comment 23 Katrin Fischer 2020-08-16 21:43:06 UTC
Created attachment 108375 [details] [review]
Bug 25364: Undo change to 'None specified'

As this has been a little controversial, this patch undoes
the change to "None specified / Prefer not to say" to be
"None specified" again as before this patch set.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 24 Katrin Fischer 2020-08-16 21:45:05 UTC
Hm, I agree with Julian. So I have attached a follow-up that restores the original description. It would still be relatively easy to change it with jQuery if needed.
Comment 25 Jonathan Druart 2020-08-18 15:46:31 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 26 Lucas Gass (lukeg) 2020-09-04 15:30:05 UTC
enhancement will not be backported to 20.05.x