https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19673 introduced an empty option for Attribute in the Batch Patron Modification. If you leave "Attribute" empty and click "New", you'll get a new row where you can choose an attribute and specify a value. When you hit save, the value won't be recorded against the attribute though, because the indexes in the patron_attributes and patron_attributes_value arrays will be out of sync.
Created attachment 91130 [details] [review] Bug 23218: Fix shift in patron's attributes in batch patron modification When the "new" button is clicked without selecting a patron's attribute, the update will have unexpected behaviors. There is indeed a difference in the number of patron's attributes and the number of values. Test plan: Go to the batch patron modification Enter a cardnumber At the bottom of the page, click "new" without selecting an attribute On the second line select one, and a value (different than an empty string) Save => The attribute will be updated with an empty string
I'll be looking at signing off this one when I'm back at the office as well. Thanks, Jonathan!
Created attachment 91373 [details] [review] Bug 23218: Fix shift in patron's attributes in batch patron modification When the "new" button is clicked without selecting a patron's attribute, the update will have unexpected behaviors. There is indeed a difference in the number of patron's attributes and the number of values. Test plan: Go to the batch patron modification Enter a cardnumber At the bottom of the page, click "new" without selecting an attribute On the second line select one, and a value (different than an empty string) Save => The attribute will be updated with an empty string Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
value="poeut" ?
(In reply to Katrin Fischer from comment #4) > value="poeut" ? That does look pretty weird...
Created attachment 91629 [details] [review] Bug 23218: Fix shift in patron's attributes in batch patron modification When the "new" button is clicked without selecting a patron's attribute, the update will have unexpected behaviors. There is indeed a difference in the number of patron's attributes and the number of values. Test plan: Go to the batch patron modification Enter a cardnumber At the bottom of the page, click "new" without selecting an attribute On the second line select one, and a value (different than an empty string) Save => The attribute will be updated with an empty string Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 91630 [details] [review] Bug 23218: (QA follow-up) Remove dummy value Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(In reply to David Cook from comment #5) > (In reply to Katrin Fischer from comment #4) > > value="poeut" ? > > That does look pretty weird... It works with out this, so removed the extra value - it wasn't added if the dropdown was changed so I assume leftover testing code
Nice work! Pushed to master for 19.11.00
(In reply to Nick Clemens from comment #8) > (In reply to David Cook from comment #5) > > (In reply to Katrin Fischer from comment #4) > > > value="poeut" ? > > > > That does look pretty weird... > > It works with out this, so removed the extra value - it wasn't added if the > dropdown was changed so I assume leftover testing code Thanks, sorry for that. poeut is weird indeed, it's a typo for pouet ;)
Pushed to 19.05.x for 19.05.03
backported to 18.11.x for 18.11.09