As part of bug 18928, we moved rules from default_circ_rules to circulation_rules. In that move, where default_circ_rules.holdallowed was NULL, we created an entry in circulation_rules where rule_name is holdallowed and rule_value is an empty string. This results in holds being blocked because Koha treats an empty string differently than it treats an undefined rule.
Created attachment 106218 [details] [review] Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string On the interface, if "Hold policy" is "Not set", the rule does not exist in the table. We should reflect that during the update DB process. Test plan: 1. Set "Hold policy" to "Not set" 2. Confirm that you can place holds 3. Confirm that the rule does not exist in the DB table 4. Set the value to an empty string (manually) 5. Confirm that you cannot longer place holds 6. Go to the circulation rules page and confirm that the value of "Hold policy" is "Not set" 7. Execute the update DB entry 8. Confirm that you can place holds 9. Confirm that the rule does not exist in the DB table
Created attachment 106324 [details] [review] Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string On the interface, if "Hold policy" is "Not set", the rule does not exist in the table. We should reflect that during the update DB process. Test plan: 1. Set "Hold policy" to "Not set" 2. Confirm that you can place holds 3. Confirm that the rule does not exist in the DB table 4. Set the value to an empty string (manually) 5. Confirm that you cannot longer place holds 6. Go to the circulation rules page and confirm that the value of "Hold policy" is "Not set" 7. Execute the update DB entry 8. Confirm that you can place holds 9. Confirm that the rule does not exist in the DB table Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signing off as it works as expected.. However.. should the retrospective correction not bit in the 19.06.00.010 (for bug 18928) as opposed to 19.12.00.018 (which is bug 18936).. or am I missing something here.. I believe Andrew meant updates to 19.11.x break as opposed to upgrades from 19.11.x? Cheers
Created attachment 106431 [details] [review] Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string On the interface, if "Hold policy" is "Not set", the rule does not exist in the table. We should reflect that during the update DB process. Test plan: 1. Set "Hold policy" to "Not set" 2. Confirm that you can place holds 3. Confirm that the rule does not exist in the DB table 4. Set the value to an empty string (manually) 5. Confirm that you cannot longer place holds 6. Go to the circulation rules page and confirm that the value of "Hold policy" is "Not set" 7. Execute the update DB entry 8. Confirm that you can place holds 9. Confirm that the rule does not exist in the DB table Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 20.11, thanks to everybody involved!
Looks like the atomicupdate here got left in master.. was that intentional for backports or something Jonathan?
Nice work everyone! Pushed to master for 20.05
backported to 20.05.x for 20.05.02
This does not apply cleanly to 19.11.x, please fix if needed.