Bug 27450

Summary: Making password required for patron registration breaks patron modification
Product: Koha Reporter: Nick Clemens <nick>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to oldoldstable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, bwsdonna, caroline.cyr-la-rose, fridolin.somers, jonathan.druart, kelly, lucas, victor
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.03,20.05.09,19.11.15
Attachments: Bug 27450: Remove password from the mandatory fields when editing details
Bug 27450: Remove password from the mandatory fields when editing details
Bug 27450: Remove password from the mandatory fields when editing details

Description Nick Clemens 2021-01-16 16:28:48 UTC
TO recreate:
1 - Set PatronSelfRegistrationBorrowerMandatoryField to require password
2 - Create or sign in as a patron on the opac
3 - Click 'Your personal details'
4 - Attempt to edit
5 - Save changes
6 - They are rejected because not all required fields are populated
Comment 1 Lucas Gass 2021-01-19 22:49:11 UTC
IMO this can be best solved in Bug 13188 by separating the OPAC MandatoryField's into two sys prefs:

PatronSelfModificationMandatoryField
PatronSelfRegistrationBorrowerMandatoryField
Comment 2 Jonathan Druart 2021-01-20 11:11:35 UTC
Created attachment 115419 [details] [review]
Bug 27450: Remove password from the mandatory fields when editing details

When a patron edit their personal details at the OPAC, the password must
be removed from the mandatory fields

Test plan:
0 - Don't apply the patch
1 - Set PatronSelfRegistrationBorrowerMandatoryField to require password
2 - Create or sign in as a patron on the opac
3 - Click 'Your personal details'
4 - Attempt to edit
5 - Save changes
=> They are rejected because not all required fields are populated
6 - Apply the patch
7 - Repeat 3 to 5
=> details are saved successfully
8 - Test the self registration feature and confirm that the password is
required
Comment 3 Nick Clemens 2021-01-20 13:25:04 UTC
Created attachment 115431 [details] [review]
Bug 27450: Remove password from the mandatory fields when editing details

When a patron edit their personal details at the OPAC, the password must
be removed from the mandatory fields

Test plan:
0 - Don't apply the patch
1 - Set PatronSelfRegistrationBorrowerMandatoryField to require password
2 - Create or sign in as a patron on the opac
3 - Click 'Your personal details'
4 - Attempt to edit
5 - Save changes
=> They are rejected because not all required fields are populated
6 - Apply the patch
7 - Repeat 3 to 5
=> details are saved successfully
8 - Test the self registration feature and confirm that the password is
required

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Katrin Fischer 2021-01-31 13:37:11 UTC
Created attachment 116104 [details] [review]
Bug 27450: Remove password from the mandatory fields when editing details

When a patron edit their personal details at the OPAC, the password must
be removed from the mandatory fields

Test plan:
0 - Don't apply the patch
1 - Set PatronSelfRegistrationBorrowerMandatoryField to require password
2 - Create or sign in as a patron on the opac
3 - Click 'Your personal details'
4 - Attempt to edit
5 - Save changes
=> They are rejected because not all required fields are populated
6 - Apply the patch
7 - Repeat 3 to 5
=> details are saved successfully
8 - Test the self registration feature and confirm that the password is
required

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2021-01-31 13:37:42 UTC
(In reply to Lucas Gass from comment #1)
> IMO this can be best solved in Bug 13188 by separating the OPAC
> MandatoryField's into two sys prefs:
> 
> PatronSelfModificationMandatoryField
> PatronSelfRegistrationBorrowerMandatoryField

I believe you are right in that will be the "right" fix, but I think this will be a nice improvement for the stable branches.
Comment 6 Jonathan Druart 2021-02-01 16:26:53 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 7 Fridolin Somers 2021-02-05 15:38:44 UTC
Pushed to 20.11.x for 20.11.03
Comment 8 Andrew Fuerste-Henry 2021-02-09 12:33:17 UTC
Pushed to 20.05.x for 20.05.09
Comment 9 Victor Grousset/tuxayo 2021-02-10 23:50:19 UTC
Backported: Pushed to 19.11.x branch for 19.11.15