Bug 28721 - Holds ratio report fails when all copies are unavailable
Summary: Holds ratio report fails when all copies are unavailable
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-19 20:38 UTC by Andrew Fuerste-Henry
Modified: 2021-07-25 01:16 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-07-19 20:38:56 UTC
To recreate:
- find a bib with just 1 item on it
- confirm the item is not notforloan, damaged, lost, or withdrawn
- place 3 holds on the title
- go to the holds ratio in circulation, confirm your title shows when the ratio is set to 3
- go back to your item, set it to lost
- reload the holds ratio, see your title is no longer listed

In the scenario above, we end up dividing by zero because there are no available items. This messes up our ratio and makes this title not show as needing more copies, even though our ratio is definitely less than 3 copies per hold.