From 7242939cf44c0fa2512448a1e7dd7ac4f7482c33 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 11 Aug 2009 19:20:48 -0400 Subject: [PATCH] future hold request followup 3 - build_holdsqueue Fixed the holds queue job so that it correctly ignores hold requests that are not yet scheduled to be filled. Signed-off-by: Galen Charlton --- misc/cronjobs/holds/build_holds_queue.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/holds/build_holds_queue.pl b/misc/cronjobs/holds/build_holds_queue.pl index 4aca28db64..4f9549f40d 100755 --- a/misc/cronjobs/holds/build_holds_queue.pl +++ b/misc/cronjobs/holds/build_holds_queue.pl @@ -83,7 +83,8 @@ sub GetBibsWithPendingHoldRequests { my $bib_query = "SELECT DISTINCT biblionumber FROM reserves WHERE found IS NULL - AND priority > 0"; + AND priority > 0 + AND reservedate <= CURRENT_DATE()"; my $sth = $dbh->prepare($bib_query); $sth->execute(); @@ -129,6 +130,7 @@ sub GetPendingHoldRequestsForBib { WHERE biblionumber = ? AND found IS NULL AND priority > 0 + AND reservedate <= CURRENT_DATE() ORDER BY priority"; my $sth = $dbh->prepare($request_query); $sth->execute($biblionumber); -- 2.39.2