From 150e8a778586bac92a79d637ac4c086d333d8568 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 23 Jan 2012 10:05:19 -0500 Subject: [PATCH] patron search result order sorting The default patron search "order by" on the server side is last name, first name, and actor.usr.id. The staff client intended to request last name, first name, middle name, and date of birth (when actor.usr.id to be tacked on in the middle layer), but a bug prevented this. This fixes that. Signed-off-by: Jason Etheridge Signed-off-by: Jason Stephenson --- Open-ILS/xul/staff_client/server/patron/search_result.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/server/patron/search_result.js b/Open-ILS/xul/staff_client/server/patron/search_result.js index 6d71bd50b2..9fc40c452f 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_result.js +++ b/Open-ILS/xul/staff_client/server/patron/search_result.js @@ -218,11 +218,15 @@ patron.search_result.prototype = { try { var results = []; + var sort_params = obj.search_sort; + if (!sort_params) { + sort_params = [ 'family_name ASC', 'first_given_name ASC', 'second_given_name ASC', 'dob DESC' ]; + } var params = [ ses(), search_hash, typeof obj.search_limit != 'undefined' && typeof obj.search_limit != 'null' ? obj.search_limit : obj.result_cap + 1, - typeof obj.search_sort != 'undefined' ? obj.search_sort : [ 'family_name ASC', 'first_given_name ASC', 'second_given_name ASC', 'dob DESC' ] + sort_params ]; if (inactive) { params.push(1); -- 2.11.0