[open-ils-commits] r16711 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jun 14 12:24:58 EDT 2010
Author: phasefx
Date: 2010-06-14 12:24:55 -0400 (Mon, 14 Jun 2010)
New Revision: 16711
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
Make the estimated hold queue position method aware of the cut_in_line field
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-06-14 16:14:23 UTC (rev 16710)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-06-14 16:24:55 UTC (rev 16711)
@@ -1029,14 +1029,24 @@
# accomodate holds that currently have no potential copies
my $q_holds = $e->json_query({
- # fetch request_time since it's in the order_by and we're asking for distinct values
- select => {ahr => ['id', 'request_time']},
+ # fetch cut_in_line and request_time since they're in the order_by
+ # and we're asking for distinct values
+ select => {ahr => ['id', 'cut_in_line', 'request_time']},
from => {
ahr => {
ahcm => {type => 'left'} # there may be no copy maps
}
},
- order_by => {ahr => ['request_time']},
+ order_by => [
+ {
+ "class" => "ahr",
+ "field" => "cut_in_line",
+ "transform" => "coalesce",
+ "params" => [ 0 ],
+ "direction" => "desc"
+ },
+ { "class" => "ahr", "field" => "request_time" }
+ ],
distinct => 1,
where => {
'-or' => [
More information about the open-ils-commits
mailing list