From: Galen Charlton Date: Fri, 7 Feb 2020 23:40:33 +0000 (-0500) Subject: ensure that json_query will produce useful SQL when sorting by an LIA X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3d1879161d50cdcdfae52d9d1dcf2ac96842fd59;p=working%2FEvergreen.git ensure that json_query will produce useful SQL when sorting by an LIA Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm index c16a5d38f4..53acda4a22 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm @@ -630,6 +630,10 @@ q/order_by clause must be of the long form, like: "type" => "left", "field" =>"lineitem" }; + # and ensure that the aggregate form of the attribute + # value column is included in the order_by + $order_by->{aggregate} = 1; + $order_by->{transform} = 'first'; } } }