Bug 39056

Summary: Do not copy preferred_name to new patron when using Duplicate
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: PatronsAssignee: Nick Clemens (kidclamp) <nick>
Status: Pushed to stable --- QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: normal    
Priority: P5 - low CC: emily.lamancusa, gmcharlt, jonathan.druart, kkrueger, kyle.m.hall, laura, nick, paul.derscheid
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36987
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00,24.11.04
Circulation function:
Attachments: Bug 39056: Do not copy preferred_name to new patron when using Duplicate
Bug 39056: Do not copy preferred_name to new patron when using Duplicate
Bug 39056: Do not copy preferred_name to new patron when using Duplicate
Bug 39056: Do not copy preferred_name to new patron when using Duplicate

Description Andrew Fuerste-Henry 2025-02-06 18:12:36 UTC
When using the Duplicate button from a patron's record, we make a new patron with some of the original patron's info. We bring the surname to the new patron, but not the firstname. Following that logic, we shouldn't copy preferred_name, either. Currently on main the preferred_name *is* copied to the new patron. 

In the long run this probably wants something like the PrefillGuaranteeField syspref, but in the short term we should just exclude preferred_name.
Comment 1 Nick Clemens (kidclamp) 2025-02-06 19:28:16 UTC
Created attachment 177592 [details] [review]
Bug 39056: Do not copy preferred_name to new patron when using Duplicate

It looks like this was a type/copy paste error, template fixed

To test:
1 - Find a patron, ensure preferred_name is populated
2 - Duplicate
3 - Note preferred_name is carried over
4 - Apply patch
5 - Cancel and duplicate again
6 - Preferred name is blank!
Comment 2 Andrew Fuerste-Henry 2025-02-06 19:45:36 UTC
Created attachment 177594 [details] [review]
Bug 39056: Do not copy preferred_name to new patron when using Duplicate

It looks like this was a type/copy paste error, template fixed

To test:
1 - Find a patron, ensure preferred_name is populated
2 - Duplicate
3 - Note preferred_name is carried over
4 - Apply patch
5 - Cancel and duplicate again
6 - Preferred name is blank!

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 3 Emily Lamancusa (emlam) 2025-02-07 15:54:05 UTC
Created attachment 177637 [details] [review]
Bug 39056: Do not copy preferred_name to new patron when using Duplicate

It looks like this was a type/copy paste error, template fixed

To test:
1 - Find a patron, ensure preferred_name is populated
2 - Duplicate
3 - Note preferred_name is carried over
4 - Apply patch
5 - Cancel and duplicate again
6 - Preferred name is blank!

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 4 Emily Lamancusa (emlam) 2025-02-07 15:54:31 UTC
Good catch, thanks all! Passing QA
Comment 5 Jonathan Druart 2025-02-12 14:08:43 UTC
Created attachment 177916 [details] [review]
Bug 39056: Do not copy preferred_name to new patron when using Duplicate

It looks like this was a type/copy paste error, template fixed

To test:
1 - Find a patron, ensure preferred_name is populated
2 - Duplicate
3 - Note preferred_name is carried over
4 - Apply patch
5 - Cancel and duplicate again
6 - Preferred name is blank!

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 6 Katrin Fischer 2025-02-12 14:15:11 UTC
Good catch!
Comment 7 Katrin Fischer 2025-02-12 14:29:05 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 8 Kristi 2025-04-09 13:22:39 UTC
Could this be backported to 24.11?
Comment 9 Laura O'Neil 2025-04-22 13:06:35 UTC
+1 for a backport to 24.11.xx, if possible.
Comment 10 Paul Derscheid 2025-04-22 20:28:32 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.04