https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26659 --- Comment #7 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Nick Clemens from comment #6)
Trying to read the code, but there is a lot happening here, I feel this needs unit tests
The check for 'OK' makes sense, but some of the other statuses like 'itemAlreadyOnHold' short circuit other checks, so while it saves us time in CanItemBeReserved to bail out, I think in this instance we are actually trying to determine "CanItemFillHold", CheckReserves seems to cover some, but not all cases
To do the tests and new sub CanItemFillHold I need to move some code out of CanBookBeRenewed. This week is busy so it might take me a while to get the new patches for this done, I also wouldn't mind anybody else taking in on this. The code I identified as potential candidate for CanItemFillHold is the code in the if block that starts after the comment
# This item can fill one or more unfilled reserve, can those unfilled reserves # all be filled by other available items?
-- You are receiving this mail because: You are watching all bug changes.