Bug 35964

Summary: User cannot update their account if a column in PatronSelfModificationMandatoryField is also in PatronSelfRegistrationBorrowerUnwantedField
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: hebah
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Nick Clemens (kidclamp) 2024-01-31 15:55:41 UTC
subroutine ParseCgiForBorrower is used in both self-reg and self-modification,however,it always removes the unwanted fields in PatronSelfRegistrationBorrowerUnwantedField

564     delete $borrower{$_} for split( /\s*\|\s*/, C4::Context->preference('PatronSelfRegistrationBorrowerUnwantedField') || q{} );

To recreate:
1 - Add 'fax' to PatronSelfRegistrationBorrowerUnwantedField
2 - Add 'fax' to PatronSelfModificationMandatoryField
3 - Self register on the OPAC, note there is no 'fax' field
4 - Sign in as the new borrower
5 - Attempt to edit, note 'fax' is required, fill it
6 - Save the form - 'you are missing a required field'
7 - Remove 'fax' from PatronSelfRegistrationBorrowerUnwantedField
8 - Save the form again, now it works