Closed minusdavid closed 11 months ago
When a hold is attempted against Koha's core APIs, it'll say "Hold cannot be placed. Reason: itemAlreadyOnHold".
I haven't looked at the Koha code, but I wonder if this is one of those situations where the logic is embedded in the View rather than the Model.
Thanks for the report, I'll check this out as soon as possible. The usual issue is that there is (or was when the plugin code was created) no performant way of checking this in the core code so the plugin does its own checks but is missing a bit.
As you said the other day, holds seem simple on the surface, but they're so complicated once you really start getting into the guts of them... 😬
Hmm I'm also seeing it say "available" even when there's too many holds for the record...
The scenario is that I've already placed an item level hold on Item A for Record A.
The API response for the "hold" endpoint says that holds are available at the record level and the item level, but if you go into the Koha OPAC, it'll say the following:
At the record level: "You already have at least one item level hold on this title. All further holds must be item level."
At the item level: "This title cannot be requested because you already have hold for this item."