From: Kyle Tomita Date: Tue, 18 Jun 2013 23:14:49 +0000 (-0700) Subject: LP1125567 - Staff client doesn't sort patron's checked out items X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2216a4693e4363b64d02cd3e8a85e028ceac182f;p=working%2FEvergreen.git 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 Signed-off-by: Pasi Kallinen --- 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