LP1895660: HoldTarger.pm
authorJason Boyer <JBoyer@equinoxinitiative.org>
Tue, 15 Sep 2020 18:00:54 +0000 (14:00 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 14 May 2021 21:38:07 +0000 (17:38 -0400)
"order_by" object in a query is not a JSON_HASH or JSON_ARRAY;no ORDER BY generated

json_query and CStoreEditor search_* functions don't want a string field name,
they work with hashes or arrays thereof.

Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm

index 3816822..56e9c84 100644 (file)
@@ -1230,7 +1230,7 @@ sub process_recalls {
             checkin_time => undef,
             duration => {'>' => $threshold}
         }, {
-            order_by => 'due_date',
+            order_by => [{ class => 'circ', field => 'due_date'}],
             limit => 1
         }
     ])->[0];