From: Jeff Godin Date: Mon, 3 Jun 2013 20:03:11 +0000 (-0400) Subject: Add explicit sort to collections API with limit X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1cffbc606643e859f1096a47e6b720e1a8100202;p=evergreen%2Ftadl.git Add explicit sort to collections API with limit Add an explicit ORDER BY au.id ASC when limiting collections API calls. This ensures that the same users will be returned on subsequent calls, assuming no other relevant changes in the data. Signed-off-by: Jeff Godin --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm index c66daba113..0140d16f1e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm @@ -266,7 +266,8 @@ sub users_of_interest_warning_penalty { $query->{limit} = $limit; my $sort_order = $sort || "DESC"; $query->{order_by} = [ - {class => 'ausp', field => 'set_date', direction => $sort_order} + {class => 'ausp', field => 'set_date', direction => $sort_order}, + {class => 'au', field => 'id', direction => 'ASC'} ]; }