Bug 9320 Pending reserves report should not show waiting items
authorSophie Meynieux <sophie.meynieux@biblibre.com>
Wed, 26 Dec 2012 16:36:45 +0000 (17:36 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 8 Feb 2013 14:02:53 +0000 (09:02 -0500)
    Test plan : * chose an item reserved by multiple patrons.
                * return the item and confirm reservation =>
                  item is waiting to be picked up
                * run circ/pendingreserves.pl
                    => without patch, this item is shown in the list
                    => with the patch, only really available items are show.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Works according to test plan. The title with one waiting item appeared
in pending holds report before the patch, doesn't appear after the
patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
circ/pendingreserves.pl

index 0f5d3da..31ecd85 100755 (executable)
@@ -141,6 +141,7 @@ if ( $run_report ) {
     $sqldatewhere
     AND (reserves.itemnumber IS NULL OR reserves.itemnumber = items.itemnumber)
     AND items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where datearrived IS NULL)
+    AND items.itemnumber NOT IN (select itemnumber FROM reserves where found='W')
     AND issues.itemnumber IS NULL
     AND reserves.priority <> 0 
     AND reserves.suspend = 0