If a patron attribute has the authorized value 0, using the Batch patron modification tool does not save the value. Test case: Authorized values category YES_NO; No=0, Yes=1 Set patron attribute type to use the YES_NO category Tools Batch patron modification Select patrons Set attribute to 0 Save The attribute has not saved Many thanks.
Created attachment 69984 [details] [review] Bug 19673: Allow to set patron attributes to 0 with batch patron modification This patch will have to be tested deeply to make sure it will not introduce regression! The idea is to display an empty option in the patron attributes select and ignore it. That way we can deal with false values 0 and "" which were skipped before. Test plan: Add several patron attributes Use the batch patron modification tool to add/update/remove them Play with empty "" and 0 values, as well as other values Modify several attributes in a row
Created attachment 73223 [details] [review] Bug 19673: Allow to set patron attributes to 0 with batch patron modification This patch will have to be tested deeply to make sure it will not introduce regression! The idea is to display an empty option in the patron attributes select and ignore it. That way we can deal with false values 0 and "" which were skipped before. Test plan: Add several patron attributes Use the batch patron modification tool to add/update/remove them Play with empty "" and 0 values, as well as other values Modify several attributes in a row Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Could reproduce the original issue with newly created attributes. The values 0 and empty string ('') were not considered during update. Applied patch, and now I could update with both 0 and an empty field. Patch set to 'Signed off'
Created attachment 73367 [details] [review] Bug 19673: Allow to set patron attributes to 0 with batch patron modification This patch will have to be tested deeply to make sure it will not introduce regression! The idea is to display an empty option in the patron attributes select and ignore it. That way we can deal with false values 0 and "" which were skipped before. Test plan: Add several patron attributes Use the batch patron modification tool to add/update/remove them Play with empty "" and 0 values, as well as other values Modify several attributes in a row Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 18.05, thanks to everybody involved!
Pushed to stable for 17.11.06 Awesome work all!
Pushed to 17.05.x for v17.05.12
I think that I may have found a regression caused by this patch: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23217 Basically I'm getting database errors when I try to do Batch Patron Modification and there is no borrower attribute provided, although there are borrower attribute codes on the system so the select menu appears.
(In reply to David Cook from comment #8) > I think that I may have found a regression caused by this patch: > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23217 > > Basically I'm getting database errors when I try to do Batch Patron > Modification and there is no borrower attribute provided, although there are > borrower attribute codes on the system so the select menu appears. The key is using DEBUG=1 in your Apache configuration to turn on RaiseError in DBI.
Also found this bug: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23218 Depending on user behaviour, it may or may not be an edge case