When adding a patron record if you enter data in the additional attributes and you get an error about a field not being filled in the additional attributes get emptied out and you have to type them in again. they should stay filled in like the rest of the form.
Whoever takes this bug keep in mind that you have to account for the possibility that the user has added an arbitrary number of new repeatable attributes to the table via JavaScript.
The same thing happens if you get a warning about the patron being a duplicate.
Mandatory fields are now checked in JS, but the issue still exists if a duplicate warning appears.
Losing pre-entered data for possible duplicate users is still an issue in 16.05. Is there any timeframe for a fix?
(In reply to Stephen Ayre from comment #4) > Losing pre-entered data for possible duplicate users is still an issue in > 16.05. Is there any timeframe for a fix? The code is being rewritten to make it more robust, see bug 20443. I think it will be easier to fix this issue when we will have it pushed.
Data loss is occurring in quite a number of data fields already keyed (including what we found here today- the new user's expiry date). There are at least two other bug reports listing data loss in addition to this one for attributes. These are 15737 and 20762. Should I open a new bug report or will the changes being proposed fix all data loss in the various fields? I note that once the duplicate warning is made, it is possible to go down into the form and rekey the lost data before returning to the duplicate warning and accepting the new-user-create, and the data rekeyed remains.
Still valid for "Additional attributes" and "Messaging preferences".
*** Bug 20762 has been marked as a duplicate of this bug. ***
Created attachment 103372 [details] [review] Bug 5161: Keep patron's attributes on warning/duplicate When a patron is added or modified and a warning appears (duplicate, inconsistent data, etc.) the form lost the patron's attributes. Test plan: Create some attribute types for patrons Create a new patron, use an userid that already exists and fill the attributes => You get a warning and the attributes are kept Modify the userid and save again Edit the same patron Modify the attributes, as well as the userid (to get the duplicate warning) => You get a warning and the attributes are kept with the modified values Modify the userid and save again => The new values are saved Edit the attributes from the detail page (so not with the full edit form) Modify them and save => The new values are saved
(In reply to Jonathan Druart from comment #7) > Still valid for "Additional attributes" and "Messaging preferences". Done with the patch for the attributes. The messaging preferences fix needs to be done on top of bug 18595.
Created attachment 103418 [details] [review] Bug 5161: Keep patron's attributes on warning/duplicate When a patron is added or modified and a warning appears (duplicate, inconsistent data, etc.) the form lost the patron's attributes. Test plan: Create some attribute types for patrons Create a new patron, use an userid that already exists and fill the attributes => You get a warning and the attributes are kept Modify the userid and save again Edit the same patron Modify the attributes, as well as the userid (to get the duplicate warning) => You get a warning and the attributes are kept with the modified values Modify the userid and save again => The new values are saved Edit the attributes from the detail page (so not with the full edit form) Modify them and save => The new values are saved Signed-off-by: David Nind <david@davidnind.com>
Created attachment 103717 [details] [review] Bug 5161: Keep patron's attributes on warning/duplicate When a patron is added or modified and a warning appears (duplicate, inconsistent data, etc.) the form lost the patron's attributes. Test plan: Create some attribute types for patrons Create a new patron, use an userid that already exists and fill the attributes => You get a warning and the attributes are kept Modify the userid and save again Edit the same patron Modify the attributes, as well as the userid (to get the duplicate warning) => You get a warning and the attributes are kept with the modified values Modify the userid and save again => The new values are saved Edit the attributes from the detail page (so not with the full edit form) Modify them and save => The new values are saved Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Great to see this old bug squashed!
Nice work everyone! Pushed to master for 20.05
errors when applying to 19.11.x please rebase if needed. not backported