Bug 36763 - Changing a patron category doesn't update form accordingly
Summary: Changing a patron category doesn't update form accordingly
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-02 17:19 UTC by Christopher Brannon
Modified: 2024-05-02 17:19 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 Christopher Brannon 2024-05-02 17:19:10 UTC
Patron editor needs to re-evaluate form when the patron category is changed.

For example, let's say you have an adult category that requires both a surname and a first name, and an institution category that requires only the surname.

You edit an existing adult category and change it into an institution.  Realistically, it should clear the first name field, remove the field, and not require it to save.  However, as is, none of this happens, and it is impossible to save without putting some value in the first name field.

Changing the patron category should clear fields that hidden for the chosen category, and hide those hidden fields, removing the required class.  And if the category is changed to something that has more fields, those fields should be shown, and if they are required, the required class added.

I know, in typical workflows, this is not necessarily an issue.  You generally create a new patron with the category first.  But on occasion, as we clean up accounts, sometimes an account changes categories, and this should be a common check.