Bug 34776

Summary: Patron messaging preferences are lost when an error occurs during new account creation
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: emmi.takkinen, gmcharlt, kyle.m.hall, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26558
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Aleisha Amohia 2023-09-12 21:01:36 UTC
To reproduce:

1. Create a new account but cause an error that will keep the account from saving (enter the wrong age for a category or give the patron a username that's already being used)
2. Set some patron messaging preferences
3. Try to save the account and wait for the "The following fields are wrong. Please fix them." message
4. Note that the patron messaging preference selections are gone and you need to re-select them

Note, this depends on the EnhancedMessagingPreferences system preference to be enabled

This is similar to Bug 26558
Comment 1 Emmi Takkinen 2024-03-20 07:34:01 UTC
This also happens when patron is duplicate (see bug 25228). It seems that when error occurs, default messaging preferences for patron category are used.
Comment 2 Emmi Takkinen 2024-03-20 10:04:48 UTC
I ran into another problem while looking into this, see bug 36368.