Bug 25566 - Change in DecreaseLoanHighHolds behaviour
Summary: Change in DecreaseLoanHighHolds behaviour
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on: 20567
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-21 11:55 UTC by Nick Clemens
Modified: 2020-09-14 19:59 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off: 20.11.00
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03, 19.11.09, 19.05.15


Attachments
Bug 25566: Add option to ignore found holds and use it when checking high holds (10.12 KB, patch)
2020-05-21 13:47 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 25566: Add option to ignore found holds and use it when checking high holds (10.18 KB, patch)
2020-05-21 17:39 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 25566: Add option to ignore found holds and use it when checking high holds (10.23 KB, patch)
2020-07-15 12:20 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2020-05-21 11:55:09 UTC
bug 25067 made current waiting holds count when determining holdability of an item, this has an effect on decreaseLoanHighHolds. Now when checking out to a patron with a waiting hold we count the loan we are currently issuing and decrease the loan period

To recreate:
1 - Find or create a record with 10 items
2 - Set sysprefs:
     decreaseLoanHighHolds - enable
     decreaseLoanHighHoldsDuration - 2
     decreaseLoanHighHoldsValue - 2
     decreaseLoanHighHoldsControl  - 'over the number of holdable items'/dynamic
3 - Set circ rules to allow 1 hold per record on the relevant record
4 - Place 3 holds on the record
5 - Check one item in and confirm hold to set to waiting
6 - Issue to the patron with the waiting hold
7 - Get a notice that loan period is decreased
Comment 1 Nick Clemens 2020-05-21 13:47:38 UTC
Created attachment 105199 [details] [review]
Bug 25566: Add option to ignore found holds and use it when checking high holds

To test:
 1 - Find or create a record with 10 items
 2 - Set sysprefs:
     decreaseLoanHighHolds - enable
     decreaseLoanHighHoldsDuration - 2
     decreaseLoanHighHoldsValue - 2
     decreaseLoanHighHoldsControl  - 'over the number of holdable items'/dynamic
 3 - Set circ rules to allow 1 hold per record on the relevant record
 4 - Place 3 holds on the record
 5 - Check one item in and confirm hold to set to waiting
 6 - Issue to the patron with the waiting hold
 7 - Get a notice that loan period is decreased
 8 - Don't confirm the checkout
 9 - Apply patch
10 - Restart all the things
11 - Repeat checkout, no decrease this time!
Comment 2 ByWater Sandboxes 2020-05-21 17:39:07 UTC
Created attachment 105223 [details] [review]
Bug 25566: Add option to ignore found holds and use it when checking high holds

To test:
 1 - Find or create a record with 10 items
 2 - Set sysprefs:
     decreaseLoanHighHolds - enable
     decreaseLoanHighHoldsDuration - 2
     decreaseLoanHighHoldsValue - 2
     decreaseLoanHighHoldsControl  - 'over the number of holdable items'/dynamic
 3 - Set circ rules to allow 1 hold per record on the relevant record
 4 - Place 3 holds on the record
 5 - Check one item in and confirm hold to set to waiting
 6 - Issue to the patron with the waiting hold
 7 - Get a notice that loan period is decreased
 8 - Don't confirm the checkout
 9 - Apply patch
10 - Restart all the things
11 - Repeat checkout, no decrease this time!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Comment 3 Christopher Brannon 2020-05-21 17:40:59 UTC
Works as described.  Would like this back ported to 19.05 if possible.
Comment 4 Nick Clemens 2020-06-02 00:36:21 UTC
Bumping severity, for affected libraries this can cause loan reductions across a wide range of materials
Comment 5 Martin Renvoize 2020-07-15 12:20:46 UTC
Created attachment 106930 [details] [review]
Bug 25566: Add option to ignore found holds and use it when checking high holds

To test:
 1 - Find or create a record with 10 items
 2 - Set sysprefs:
     decreaseLoanHighHolds - enable
     decreaseLoanHighHoldsDuration - 2
     decreaseLoanHighHoldsValue - 2
     decreaseLoanHighHoldsControl  - 'over the number of holdable items'/dynamic
 3 - Set circ rules to allow 1 hold per record on the relevant record
 4 - Place 3 holds on the record
 5 - Check one item in and confirm hold to set to waiting
 6 - Issue to the patron with the waiting hold
 7 - Get a notice that loan period is decreased
 8 - Don't confirm the checkout
 9 - Apply patch
10 - Restart all the things
11 - Repeat checkout, no decrease this time!

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2020-07-15 12:21:42 UTC
Updated tests make sense and pass with the patch.. logic makes sense and qa scritps pass.

Passing QA
Comment 7 Martin Renvoize 2020-07-16 14:42:22 UTC
Pushed to master for 20.11, thanks everyone.
Comment 8 Lucas Gass 2020-07-24 20:58:28 UTC
backported to 20.05.x for 20.05.03
Comment 9 Aleisha Amohia 2020-08-03 21:48:53 UTC
backported to 19.11.x for 19.11.09
Comment 10 Victor Grousset/tuxayo 2020-09-14 19:59:58 UTC
Backported to 19.05.x branch for 19.05.15