Bug 37269 - Saving edits to a patron - error message clears or resets some fields
Summary: Saving edits to a patron - error message clears or resets some fields
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P1 - high major
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-07 09:06 UTC by David Nind
Modified: 2024-07-07 09:06 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2024-07-07 09:06:10 UTC
When there is an error saving edits to a patron, some of the changes you make are cleared or reset to the previous value.

Changes noted for the patron field (by section):
- Patron identity: Surname reset - all other fields retain the changed values
- Patron guarantor: retains values
- Non-patron guarantor: Guarantor surname, Guarantor first name reset - all other fields retain the changed values (Relationship)
- Main address: all fields reset
- Contact information: all fields reset
- Alternative address: all fields reset
- Alternate contact: all fields reset
- Library management: none - all keep the changed values
- Library setup: none - all keep the changed values
- OPAC/Staff interface login: none - all keep the changed values (not sure about the password)
- Patron account flags: none - all keep the changed values
- Patron restrictions: none - all keep the changed values
- Additional attributes and identifiers: none - all keep the changed values
- Patron messaging preferences: all fields reset (but that may be more to do with changing the patron category)

To replicate:
1. Go to a patron record and edit it (I used Mary Burton).
2. Duplicate the tab so you can compare the differences.
3. Make changes to every field available. Changes I made:
   . Text fields: Put an 'A' in front of every existing text value or for any empty text field
   . For email address: me@example.com
   . For dropdown lists, selectors, or tick boxes, change to another value
   . For dates, change the year
4. Change a field so that it will generate an error in the info box area when you go to save. I could generate an error message by:
   . Changing the date of birth so that the age doesn't match the age range for the patron category - for Mary, change date of birth year to 2010
   . Change the patron category so that their age is incorrect for the patron category - for Mary, change from patron to Board
   (I'm sure there are other ways to generate an error message.)
5. When you save the form, you get an error message (I changed the patron category for Mary from Patron to Board):
     The following fields are wrong. Please fix them.
     . Patron's age is incorrect for their category. Ages allowed are 5-17.
6. Note that:
   . Some fields remain the same
   . Many fields are reset to the value they had before making the changes (empty or original values)

The issue was identified when testing Bug 31354 - Clarify options for 'Change messaging preferences to default for this category?' popup.