Bug 25851 - 19.11 upgrade creates holdallowed rule with empty value
Summary: 19.11 upgrade creates holdallowed rule with empty value
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 18928
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-23 14:13 UTC by Andrew Fuerste-Henry
Modified: 2021-12-13 21:08 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.02


Attachments
Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string (2.12 KB, patch)
2020-06-24 06:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string (2.18 KB, patch)
2020-06-26 09:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 25851: (bug 18928 follow-up) Remove holdallowed rule is value is an empty string (2.25 KB, patch)
2020-06-30 11:44 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2020-06-23 14:13:52 UTC
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.
Comment 1 Jonathan Druart 2020-06-24 06:47:33 UTC
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
Comment 2 Martin Renvoize 2020-06-26 09:52:02 UTC
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>
Comment 3 Martin Renvoize 2020-06-26 09:55:00 UTC
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
Comment 4 Kyle M Hall 2020-06-30 11:44:06 UTC
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>
Comment 5 Jonathan Druart 2020-07-09 10:06:06 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 6 Martin Renvoize 2020-07-15 12:13:58 UTC
Looks like the atomicupdate here got left in master.. was that intentional for backports or something Jonathan?
Comment 7 Martin Renvoize 2020-07-16 14:21:33 UTC Comment hidden (obsolete)
Comment 8 Lucas Gass 2020-07-17 19:58:54 UTC
backported to 20.05.x for 20.05.02
Comment 9 Aleisha Amohia 2020-07-19 23:55:49 UTC
This does not apply cleanly to 19.11.x, please fix if needed.