Bugzilla – Attachment 184459 Details for
Bug 40459
Preferred name is lost when editing partial record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40459: Preferred name is lost when editing partial record
Bug-40459-Preferred-name-is-lost-when-editing-part.patch (text/plain), 2.41 KB, created by
CJ Lynce
on 2025-07-21 21:40:56 UTC
(
hide
)
Description:
Bug 40459: Preferred name is lost when editing partial record
Filename:
MIME Type:
Creator:
CJ Lynce
Created:
2025-07-21 21:40:56 UTC
Size:
2.41 KB
patch
obsolete
>From bab28dec88ca7078271e20d1f3e7519419e2b4e0 Mon Sep 17 00:00:00 2001 >From: Imani Thomas <imani.thomas@bywatersolutions.com> >Date: Mon, 21 Jul 2025 16:56:34 +0000 >Subject: [PATCH] Bug 40459: Preferred name is lost when editing partial record > >To test: >* on the patron page click edit at the top, entered a preferred name, and hit save > * we should see the preferred name being displayed instead of the first name for the user >* go back to the main edit page and change the preferred name to a blank space > * We should revert back to the first name being used >* if we open the edit page back up we should see the first name in the preferred name field >* Edit the preferred name again and click on details >* open up any of the sections other then contact information >* hit the save button on the section without changing anything > * you should still see the preferred name you set being used. >* open up an individual section other then contact method, change a value, then save > * you should still see the preferred name you set being used. >* open up the contact information section and save without changing anything > * the preferred name should be intact >* open up the contact information and change the preferred name, and save. > * you should see the new preferred name reflected. >* Open up the contact information section, change the preferred name field to a blank and save. > * you should see the first name being used now. >* Open up the contact information section, and put any number of spaces in the preferred name with nothing else and then save. > * you should still see the first name being used. > >Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org> >--- > members/memberentry.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 6b39df2996..5f15a10555 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -550,7 +550,9 @@ if ( ( !$nok ) and $nodouble and ( $op eq 'cud-insert' or $op eq 'cud-save' ) ) > $patron = Koha::Patrons->find($borrowernumber); > > # Ensure preferred name is set even if not passed because of BorrowerUnwantedFields >- $newdata{preferred_name} = undef unless defined $newdata{preferred_name}; >+ if ( $step == 0 or $step == 1 ) { >+ $newdata{preferred_name} = undef unless defined $newdata{preferred_name}; >+ } > > if ($NoUpdateEmail) { > delete $newdata{'email'}; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40459
:
184449
|
184458
|
184459
|
184624