Browse Source

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>
3.18.x
Kyle Hall 9 years ago
committed by Tomas Cohen Arazi
parent
commit
3463dd2449
  1. 3
      C4/Reserves.pm

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

Loading…
Cancel
Save