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 <gmcharlt@gmail.com>
This commit is contained in:
Galen Charlton 2009-08-11 19:20:48 -04:00
parent 4ecaa1f9bd
commit 7242939cf4

View file

@ -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);