Bug 39009

Summary: When creating a new patron, preferred_name is not used in construction of username
Product: Koha Reporter: Julie <julie>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andrew, bywater, gmcharlt, kyle, rcoert, sspohn
Version: 24.11   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Julie 2025-01-31 19:03:15 UTC
In 24.11.01 creating a new patron the "Preferred Name" field is not used in the new patron account.  Instead the "First Name" is used.
Comment 1 Katrin Fischer 2025-01-31 21:21:12 UTC
Julie, can you explain that a bit more? Do you mean the display of the name after saving? And when: where?
Comment 2 Andrew Fuerste-Henry 2025-02-03 19:48:55 UTC
Libraries have reported concern that the username automatically generated when creating a patron is still generated as [firstname].[surname], rather than [preferred_name].[surname].
Comment 3 Steve, OSLRI, USA 2025-02-03 23:10:07 UTC
In addition to the automatic generation of the username by Koha, I'm also curious about the Aspen integration.  I'd want to be sure that Aspen sends preferred_name in lieu of first_name if it exists.

(I'm not super enamoured by "preferred" as I feel that could be insulting in some circumstances, but we can easily use a little JS to rewrite the display of the field name to suit our local climate.  So, I won't push that issue.)
Comment 4 Andrew Fuerste-Henry 2025-02-04 20:25:35 UTC
(In reply to Steve, OSLRI, USA from comment #3)
> In addition to the automatic generation of the username by Koha, I'm also
> curious about the Aspen integration.  I'd want to be sure that Aspen sends
> preferred_name in lieu of first_name if it exists.
> 
> (I'm not super enamoured by "preferred" as I feel that could be insulting in
> some circumstances, but we can easily use a little JS to rewrite the display
> of the field name to suit our local climate.  So, I won't push that issue.)

Aspen behavior is outside our scope here, though it is important.
There's an argument to be made that it will never get easier than it is now to rename those fields so firstname is legal_name and preferred_name is ... something else? legal_name and first_name (where first_name is what's currently named preferred_name) makes a lot of sense to me right up until I try to imagine explaining the change to someone. But, again, maybe it's best to tear the bandaid now? Come to a Koha community dev meeting and see what people say to the idea!
Comment 5 Andrew Fuerste-Henry 2025-02-04 21:05:37 UTC
Since bug 32426 there is a plugin hook for username generation. Use of a plugin to modify username generation locally as needed seems like the best approach here. As such, I'm closing this bug.