Bug 4224 - Holds queue report includes items already allocated
Summary: Holds queue report includes items already allocated
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-18 09:14 UTC by Owen Leonard
Modified: 2015-06-04 23:23 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:24:37 UTC


---- Reported by oleonard@myacpl.org 2010-02-18 21:14:45 ----

When /misc/cronjobs/holds/build_holds_queue.pl builds the holds queue report, it looks for items which are available to fulfill an outstanding hold, in GetItemsAvailableToFillHoldRequestsForBib. It selects items which are available, not lost etc., and then excludes items ("AND itemnumber NOT IN") in this set:

SELECT itemnumber
FROM reserves
WHERE biblionumber = ?
AND itemnumber IS NOT NULL
AND (found IS NOT NULL OR priority = 0)

However, look at the data for an item which has been allocated for a hold but which isn't marked as waiting ("found = W") yet because it is in transit to its destination branch: reserves.itemnumber will not be NULL, but found *will* still be NULL. Therefore such items will NOT be excluded from the holds queue report.

If this diagnosis is correct, that explains why my staff finds entries on the holds queue report which they have already checked in and sent through cargo delivery to other branches.

From IRC today:

<gmcharlt> subquery would then either have to include a join on branchtransfers
<gmcharlt> or perhaps define a new value for found : 'T'
<gmcharlt> meaning that hte item is allocated for a hold but is in transit
---
<gmcharlt> thinking about it a bit more, I think defining a found status of 'T' is the way to go
<gmcharlt> but there are ~15 place that I'll need to check



---- Additional Comments From gmcharlt@gmail.com 2010-02-22 03:26:37 ----

Very preliminary patches for http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3344 and http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4224 are available to pull from the holds branch of  git://git.librarypolice.com/git/koha-galen.git.  Feedback requested.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:24 UTC  ---

This bug was previously known as _bug_ 4224 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4224

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.

Comment 1 Owen Leonard 2014-11-04 19:57:37 UTC
I can't reproduce this bug in master anymore.