Bug 30372

Summary: Patron self registration: Extended patron attributes are emptied on submit when mandatory field isn't filled in
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: OPACAssignee: Pedro Amorim <pedro.amorim>
Status: Pushed to oldstable --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: david, fridolin.somers, lucas, pedro.amorim, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30120
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
This fixes the patron self registration form when extended patron attributes are used. If a mandatory field wasn't filled in when submitting, the values entered into any extended patron attributes were lost and needed re-entering.
Version(s) released in:
24.11.00,24.05.02,23.11.07
Circulation function:
Attachments: Bug 30372: Fix value->attribute
Bug 30372: Fix value->attribute
Bug 30372: Fix value->attribute

Description Katrin Fischer 2022-03-27 13:06:37 UTC
Testing bug 30120 I noticed that when you lave a mandatory extended patron attribute (or possibly another mandatory field) empty, all values already entered in extended attributes will be removed when clicking submit.

To test:
- Activate patron self registration without email verification
- Create several patron attributes as visible and editable in the OPAC, make one mandatory
- Register as a new patron from the OPAC
- Fill in all required fields but the extended attribute
- Submit
- Verify that the contents of the other extended attribute fields have been removed and you are forced to re-enter
Comment 1 Pedro Amorim 2024-05-24 16:11:37 UTC
Created attachment 167170 [details] [review]
Bug 30372: Fix value->attribute

Test plan:
- Activate patron self registration without email verification
- Create several patron attributes as visible and editable in the OPAC, make one mandatory
- Register as a new patron from the OPAC
- Fill in all required fields but the extended attribute
- Fill in at least one of the non-required extended attributes
- Submit
- Verify that the contents of the other extended attribute fields are still present.
Comment 2 David Nind 2024-05-24 23:24:10 UTC
Created attachment 167177 [details] [review]
Bug 30372: Fix value->attribute

Test plan:
- Activate patron self registration without email verification
- Create several patron attributes as visible and editable in the OPAC, make one mandatory
- Register as a new patron from the OPAC
- Fill in all required fields but the extended attribute
- Fill in at least one of the non-required extended attributes
- Submit
- Verify that the contents of the other extended attribute fields are still present.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Nick Clemens (kidclamp) 2024-06-25 23:03:14 UTC
Created attachment 168112 [details] [review]
Bug 30372: Fix value->attribute

Test plan:
- Activate patron self registration without email verification
- Create several patron attributes as visible and editable in the OPAC, make one mandatory
- Register as a new patron from the OPAC
- Fill in all required fields but the extended attribute
- Fill in at least one of the non-required extended attributes
- Submit
- Verify that the contents of the other extended attribute fields are still present.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Katrin Fischer 2024-06-27 09:52:16 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 5 Lucas Gass (lukeg) 2024-07-19 15:18:54 UTC
Backported to 24.05.x for upcoming 24.05.02
Comment 6 Fridolin Somers 2024-07-22 09:48:03 UTC
Pushed to 23.11.x for 23.11.07
Comment 7 Wainui Witika-Park 2024-09-17 03:35:33 UTC
Not backporting to 23.05.x unless requested