summaryrefslogtreecommitdiff
authorKyle M Hall <kyle@bywatersolutions.com>2014-02-24 16:32:39 (GMT)
committer Tomas Cohen Arazi <tomascohen@gmail.com>2014-11-04 21:53:43 (GMT)
commit3463dd244928e50e2a5e8b90f06dd072d7a93241 (patch) (side-by-side diff)
treedcc647956903871e6ade749e9603df874d7c5678
parent6b2d2abb1945af5fb2f9d5d0d824e08ef3b7865e (diff)
Bug 11126 [QA Followup] - Make reserves returned by _Findgroupreserve sorted by priority
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--C4/Reserves.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/C4/Reserves.pm b/C4/Reserves.pm
index bb70713..c4fe7c0 100644
--- a/C4/Reserves.pm
+++ b/C4/Reserves.pm
@@ -1890,6 +1890,7 @@ sub _Findgroupreserve {
AND itemnumber = ?
AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY)
AND suspend = 0
+ ORDER BY priority
/;
my $sth = $dbh->prepare($item_level_target_query);
$sth->execute($itemnumber, $lookahead||0);
@@ -1922,6 +1923,7 @@ sub _Findgroupreserve {
AND hold_fill_targets.itemnumber = ?
AND reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY)
AND suspend = 0
+ ORDER BY priority
/;
$sth = $dbh->prepare($title_level_target_query);
$sth->execute($itemnumber, $lookahead||0);
@@ -1955,6 +1957,7 @@ sub _Findgroupreserve {
AND (reserves.itemnumber IS NULL OR reserves.itemnumber = ?)
AND reserves.reservedate <= DATE_ADD(NOW(),INTERVAL ? DAY)
AND suspend = 0
+ ORDER BY priority
/;
$sth = $dbh->prepare($query);
$sth->execute( $biblio, $bibitem, $itemnumber, $lookahead||0);