[Bug 40459] New: Preferred name is lost when editing partial record
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Bug ID: 40459 Summary: Preferred name is lost when editing partial record Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com To recreate: - have a patron with a preferred_name - click the big Edit button at the top of the record to edit the whole patron record, change something other than preferred name, click save - confirm preferred name is retained - click the edit button in the Contact Information section of the record to edit part of patron record, change something other than preferred name, click save - confirm preferred name is retained - click the edit button in **any other** section of the record to edit part of patron record, change something other than preferred name, click save - confirm preferred name is lost -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 mteal@greenvillelibrary.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mteal@greenvillelibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #1 from mteal@greenvillelibrary.org --- It'd be great to have this patched on 24.11. While we can ask staff to not use the sectional edit buttons, they inevitably will, so we risk losing data. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Laura O'Neil <laura@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |laura@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #2 from Imani <imani.thomas@bywatersolutions.com> --- Created attachment 184449 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184449&action=edit 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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 CJ Lynce <cj.lynce@westlakelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cj.lynce@westlakelibrary.or | |g --- Comment #3 from CJ Lynce <cj.lynce@westlakelibrary.org> --- @Imani: Commenting out the test for preferred_name entirely causes some unexpected behavior if any preferred_names are set and then you change BorrowerUnwantedField to exclude preferred_name. In this case you will no longer be able to edit the preferred_name, and changing the patron's firstname will no change the preferred name, A better solution would be to wrap the test for preferred_name in an if clause based on the $step variable passed from the form. $step = 0 if the full form is being edited. $step = 1 if the Contact Info portion is being edited. Anything else is a partial edit of the form elsewhere. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40462 --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to CJ Lynce from comment #3)
@Imani: Commenting out the test for preferred_name entirely causes some unexpected behavior if any preferred_names are set and then you change BorrowerUnwantedField to exclude preferred_name. In this case you will no longer be able to edit the preferred_name, and changing the patron's firstname will no change the preferred name,
This is odd because elsewhere in the patron record any value set in a field that gets hidden via BorrowerUnwantedField is saved forever and cannot be edited from the patron record. But following that behavior for preferred_name would cause problems for patrons who change their firstnames, as their preferred_name would not update --and as soon as firstname and preferred_name do not match, Koha starts displaying preferred_name around the intranet and OPAC. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #5 from CJ Lynce <cj.lynce@westlakelibrary.org> --- (In reply to Andrew Fuerste-Henry from comment #4)
This is odd because elsewhere in the patron record any value set in a field that gets hidden via BorrowerUnwantedField is saved forever and cannot be edited from the patron record. But following that behavior for preferred_name would cause problems for patrons who change their firstnames, as their preferred_name would not update --and as soon as firstname and preferred_name do not match, Koha starts displaying preferred_name around the intranet and OPAC.
Ideally, there would be a test to see if preferred_name is hidden BorrowerUnwantedField, and in that case, ignores, but doesnt change, the preferred_name field. This way, anything stored in preferred_name is preserved in the event its hidden then unhidden in the future. That said, without knowing exactly how preferred_name is handled throughout Koha, it is potentially a big undertaking to change this behavior. For the time being, though it doesn't really follow the behavior of other hidden/stored patron fields, the newdata{preferred_name} = undef unless defined $newdata{preferred_name} test helps to prevent a wrong preferred_name from being locked in if the field is hidden. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #6 from Imani <imani.thomas@bywatersolutions.com> --- Created attachment 184458 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184458&action=edit Bug 40459: Preferred name is lost when editing partial record to test: * follow test plan of previous patch * add preferred_name to BorrowerUnwantedField * updating the full patron or contact information field should update the preferred_name to the current first name -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #7 from CJ Lynce <cj.lynce@westlakelibrary.org> --- Created attachment 184459 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184459&action=edit 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> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 CJ Lynce <cj.lynce@westlakelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184458|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 CJ Lynce <cj.lynce@westlakelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184449|Bug 40459: Preferred name |Bug 40459: Preferred name description|is lost when editing |is lost when editing |partial record to test: * |partial record to test: * |on the patron page click |on the patron page click |edit at the top, entered a |edit at the top, entered a |preferred name, and hit |preferred name, and hit |save * we should see |save * we should see |the preferred name being |the preferred name being |displayed instead of the |displayed instead of the |first name for the user * |first name for the user * |go back |go back Attachment #184449|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 CJ Lynce <cj.lynce@westlakelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch Assignee|koha-bugs@lists.koha-commun |imani.thomas@bywatersolutio |ity.org |ns.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 CJ Lynce <cj.lynce@westlakelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #8 from CJ Lynce <cj.lynce@westlakelibrary.org> --- Patch works as intended both when preferred_name is not hidden, and when it is. I squashed both patches into one and cleaned up the test plan for good measure. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Trivial patch |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184459|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184624&action=edit 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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #10 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #11 from Laura O'Neil <laura@bywatersolutions.com> --- Thanks Lucas! Can this be backported to 24.11.xx please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #12 from mteal@greenvillelibrary.org --- We'd like to see this backported to 24.11. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords| |rel_24_11_candidate, | |rel_25_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 --- Comment #13 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_25_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00,25.05.03 |25.11.00,25.05.03,24.11.09 released in| | Status|Pushed to stable |Pushed to oldstable CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40459 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #15 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org