[Koha-bugs] [Bug 25408] CanBookBeReserved & CanItemBeReserved should check "opacitemholds" policy
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Aug 4 16:51:15 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25408
--- Comment #25 from Arthur Suzuki <arthur.suzuki at biblibre.com> ---
(In reply to Nick Clemens from comment #20)
> Needs a minor rebase
done \o/
>
> I am not sure this is the best way to go. With these patches we fetch every
> item from the db and check the hold rule - but this doubles work we do in
> CanItemBeReserved and feels unnecessary
>
> Currently the loop in CanBookBeReserved returns as soon as it finds one 'OK'
> - you loop over all items to check the holds policy first - I think if we
> return the holds policy too from CanItemBeReserved we can return if one item
> is OK and item level holds not forced. I believe this would allow removal of
> the caller check too
Good advice, applied :)
> The code on the patches returns 'RecordHoldNotAllowed' if any items have
> item level holds forced, but shouldn't it only return that if all items on
> the biblio are forced?
>
Erfff... you mean different items belonging to a single biblio could have
different rules? daaaaaamn...
> You add an extra fetch for the item which has already been fetched in the
> code:
> 429 $item = Koha::Items->find( $itemnumber );
This has been corrected in the qa patch :)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list