Bug 29531 - CanBookBeRenewed is inconsistent when checking AllowRenewalIfOtherItemsAvailable
Summary: CanBookBeRenewed is inconsistent when checking AllowRenewalIfOtherItemsAvailable
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-19 16:28 UTC by Nick Clemens
Modified: 2021-11-19 16:30 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-11-19 16:28:19 UTC
In working on bug 29483 it was found that the logic of CanBookBeRenewed can be flawed when relating to AllowRenewalIfOtherItemsAvailable

At checkin we call 'CheckReserves' to find holds on the current item and will fill only holds that obey hold 'policies' - but we will also fill a hold that violates the 'rules'

To recreate:
1 - Set circ rules to allow 5 holds for All/All
2 - Set an itemtype level circ rule to allow 0 holds
3 - Place a title level hold on a record with an item of that type and one of another type
4 - Note while placing hold that you cannot select the item of that type
5 - Check in the item with that type - the hold is trapped - ignore it for now
6 - Check out the other item to a patron
7 - Note the renew column in checkouts says 'On hold'
8 - Set AllowRenewalIfOtherItemsAvailable to 'Allow'
9 - Note the renew column still says 'On hold' despite the fact that that item will fill the existing hold