[Koha-bugs] [Bug 12632] New: Hold limits ignored for record level holds with item level itemtypes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 23 14:07:07 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12632

            Bug ID: 12632
           Summary: Hold limits ignored for record level holds with item
                    level itemtypes
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Hold requests
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: kyle at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com

The crux of the issue is that if you are using item level itemtypes, but are
allowing biblio levels holds, those holds do not have items.

So, in CanItemBeReserved, when Koha counts the number of holds to compare
against the given rule, it will always give 0 ( except of course for found
holds, and the occasional item-level hold ).

So the query is saying "link each of these reserves to the reserved item, and
count the number of reserves this patron where the itemtype is DVD". However,
since these are all record level reserves, there are no items to link to, and
so when it looks for all reserves this and item whose itemtype is DVD, it finds
zero reserves!

I can see a few resolutions to this:
1) Add a system preference ReservesControlTypeLevel to allow a library to
select between item and record level itemtypes for hold rules.
2) Use COALESCE(itype,itemtype) to more gracefully select record level
itemtypes if the reserve is a record level hold
3) Add a conditional if to our query such that if the reserve has no itemtype,
we should join on reserves.biblionumber=items.biblionumber instead of
reserves.itemnumber=items.itemnumber, with a 'GROUP BY itemnumber' tacked on.
4) The same as 3, but instead of a conditional, join to items twice, once by
itemnumber items_i, once by biblionumber items_b. Group by itemnumber, use
COALESCE( items_i.itemtype, items_b.itemtype )

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list