From 844e66ded8f7f52a53f5b918db6d551d8e7592c9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 11 Jul 2012 10:16:35 -0400 Subject: [PATCH] Bug 8419 - Suspended holds appear on the daily holds queue Suspended holds are showing up in both the holds queue and holds to pull reports. This patch adds to the sql queries such that any hold that is suspended is not selected. --- circ/pendingreserves.pl | 1 + misc/cronjobs/holds/build_holds_queue.pl | 5 ++++- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 52a0450..61bace9 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -142,6 +142,7 @@ if ( $run_report ) { AND items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where datearrived IS NULL) AND issues.itemnumber IS NULL AND reserves.priority <> 0 + AND reserves.suspend = 0 AND notforloan = 0 AND damaged = 0 AND itemlost = 0 AND wthdrawn = 0 "; # GROUP BY reserves.biblionumber allows only items that are not checked out, else multiples occur when diff --git a/misc/cronjobs/holds/build_holds_queue.pl b/misc/cronjobs/holds/build_holds_queue.pl index f01153e..d920c04 100755 --- a/misc/cronjobs/holds/build_holds_queue.pl +++ b/misc/cronjobs/holds/build_holds_queue.pl @@ -82,7 +82,9 @@ sub GetBibsWithPendingHoldRequests { FROM reserves WHERE found IS NULL AND priority > 0 - AND reservedate <= CURRENT_DATE()"; + AND reservedate <= CURRENT_DATE() + AND suspend = 0 + "; my $sth = $dbh->prepare($bib_query); $sth->execute(); @@ -125,6 +127,7 @@ sub GetPendingHoldRequestsForBib { AND found IS NULL AND priority > 0 AND reservedate <= CURRENT_DATE() + AND suspend = 0 ORDER BY priority"; my $sth = $dbh->prepare($request_query); $sth->execute($biblionumber); -- 1.7.2.5