From 4a139b51c560f4c49ebb2775a39105aba752ae51 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. Signed-off-by: Owen Leonard Signed-off-by: Paul Poulain --- circ/pendingreserves.pl | 1 + misc/cronjobs/holds/build_holds_queue.pl | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 52a045044c..61bace969a 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 f01153e395..d920c042a4 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); -- 2.39.5