It seems that when an item is checked in for a biblio that has a biblio-level hold, the message notifying the librarian that the book is on hold always comes up, even when holds are not allowed on that itemtype. The cause seems to be that returns.pl does not check the circulation rules, just whether or not there is a hold. There should be some sort of sanity testing to confirm that an item really is allowed to have a hold on it. Example: 1. Create a biblio with one item of a type that can have holds on it. 2. Place a hold on that biblio. 3. Create a new item of a type that cannot have a hold. 4. Check in new item.
This also applies to damaged items- damaged items will trigger holds even if AllowHoldsOnDamagedItems is set to "Don't allow" if there is another item that can have holds on the biblio.
Working on this now
It is restricted to biblio level holds, if you place an item specific hold, it works ok. Working on fix now
Yep, its C4::Reserves::CheckReserves .. and the issue is only with biblio level holds
The problem query is SELECT items.biblionumber, items.biblioitemnumber, itemtypes.notforloan, items.notforloan AS itemnotforloan, items.itemnumber FROM items LEFT JOIN biblioitems ON items.biblioitemnumber = biblioitems.biblioitemnumber LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype This is wrong, because it doesnt use the itemlevel itype. It should check the syspref and use the right level. Either biblio or item level
Created attachment 5194 [details] [review] Bug 5675 : CheckReserves not honouring item level itemtypes preferences
Created attachment 5452 [details] [review] Bug 5675 : CheckReserves not honouring item level itemtypes preferences Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> With item level itypes activated only the item for which holds were allowed in circulation rules triggered the hold notice on checkin. Also checked that biblio level itype still trigered correctly.
Change to SQL only, with a little logic around selecting which version of the query to utilize (depending on item-level_itypes). Easy to read, marking as Passed QA.
Pushed, please test