From 6d4e4d48c4ffcf30d95b4f1597219ed5940cd889 Mon Sep 17 00:00:00 2001 From: Kyle Tomita Date: Tue, 18 Jun 2013 16:14:49 -0700 Subject: [PATCH] LP1125567 - Staff client doesn't sort patron's checked out items For the solution, the sorting is handled in a fm_IDL.xml function, action::open_circ_list. The idea is to sort the action.circulation table as a subquery before the array of ids is generated. The items out are sorted by due_date with ones due earliest on top. Signed-off-by: Kyle Tomita --- Open-ILS/examples/fm_IDL.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index b4614eecb9..e25b71bede 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -3679,8 +3679,10 @@ SELECT usr, ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost, ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned, ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue - FROM action.circulation - WHERE checkin_time IS NULL + FROM (SELECT usr, fine_interval, due_date, stop_fines, xact_finish, id, checkin_time + FROM action.circulation + WHERE checkin_time IS NULL + ORDER BY due_date ASC) AS sorted_ac GROUP BY 1 -- 2.11.0