[OPEN-ILS-GENERAL] report to find holds?
Ben Shum
bshum at biblio.org
Wed Oct 30 20:46:28 EDT 2013
Hi Holly,
I'm not certain this is something that can be done via the staff
client's reports, but this is my thinking so far...
Because most given holds are title holds and targeting bib records,
but all copy locations are tied to items, it's not always going to be
a one for one connection from hold to specific item that I can think
of. An approach I might use in this situation would be getting a list
of the bib records associated with a given set of items belonging to a
particular copy location and then seeing which holds target those bib
records.
The following is something I whipped up quickly in SQL that might work:
-- Title of material, # of holds
-- Number of title holds targeted towards bib records with copies
associated with a copy location named 'In Process'
SELECT rmsr.title, COUNT(*)
FROM action.hold_request ahr
JOIN reporter.materialized_simple_record rmsr ON rmsr.id = ahr.target
WHERE ahr.hold_type = 'T'
AND ahr.target IN (
SELECT acn.record
FROM asset.copy ac
JOIN asset.copy_location acl ON acl.id = ac.location
JOIN asset.call_number acn ON acn.id = ac.call_number
WHERE acl.name = 'In Process'
AND ac.deleted = FALSE)
GROUP BY 1
ORDER BY 2 DESC;
Some potential caveats include figuring whether or not to count
inactive/suspended holds or adding some union merges to count also
things like volume or copy holds (among other types of holds) as well
if we were to focus on all the various ways holds could be placed
trying to get these items.
Good luck, curious to see what other folks think of for this question.
-- Ben
On Wed, Oct 30, 2013 at 6:55 PM, Holly Brennan <haderhold at ci.homer.ak.us> wrote:
> This is part of the question I sent out earlier, but since I received an
> answer to the complicated part I figured I’d try again with a
> smaller/simpler email. (So please excuse the double posting)
>
>
>
> Is there a way to find items that have holds placed on them, based on
> location? The best process would be a report that can pull “items on hold”
> and “location = In Process” that we can run every few days. It does not need
> to be fancy and integrated like the standard Pull List.
>
>
>
> We’re still on 2.3.4, so maybe this is an option on 2.4 or 2.5? I haven’t
> had any luck searching chat/wiki/Launchpad/release notes.
>
>
>
> If you don’t know, but are interested in this option, speak up! I can start
> a Launchpad campaign if it’s not in the works already.
>
>
>
> Thanks!
>
>
>
> - Holly
>
>
>
>
>
>
>
>
>
> Holly Brennan
>
> Library Technician II
>
> Cataloging & Tech Services
>
> Homer Public Library
>
> 907-235-3180 (main)
>
> 907-435-3154 (direct)
>
> hbrennan at cityofhomer-ak.gov
>
>
More information about the Open-ils-general
mailing list