https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28078 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Nick Clemens from comment #4)
(In reply to Joonas Kylmälä from comment #3)
Let me come back to this later but I'm pretty sure we cannot do this because (at least how the parameter is used in the bug 28013) it wouldn't follow circulation rules. We have libraries intentionally defining the amounts of holds a patron in a specific patron category and in a specific library can do to a specific item type. See also Bug 26659.
I see what you are saying, the way I understand it is this: In CanBookBeRenewed we call CanItemBeReserved to see if the item could fill the reserve
Those are two different questions:
CanItemBeReserved answers the question: "Can the patron place a hold on this item?"
What we are asking in CanBookBeRenewed is: "Can this item fill any hold for this patron?"
In the first question the number of holds the patron currently has should be taken into account as the end result would be adding one more
In the second question the number of holds don't matter, because we will not add any holds, we just want to know if we can fill the hold
The other solution is two subroutines: CanItemBeReserved CanItemFillHold
Note: We do have Koha::Holds->get_items_that_can_fill, however, that leaves out checks on transfer limits and counts of holds
Interesting. I see now you added the condition
&& (!$params->{ignore_hold_counts} || $allowedreserves == 0 )
so it still keeps follows the circulation rules also when allowedreserves rules is 0. Maybe doing the check on also how many hold requests the patron has to the biblio or item is not relevant here as you said. However, I think this patch should also skip the itemAlreadyOnHold return value for this to work on item-level holds as well, could you please re-do the patch? -- You are receiving this mail because: You are watching all bug changes.