From c07d9c47393e6af0b7b99ace23aea6283dbca9f9 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 Signed-off-by: Mike Rylander --- 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 0512e1c146..3984074021 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_result.js +++ b/Open-ILS/xul/staff_client/server/patron/search_result.js @@ -236,11 +236,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