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 <jason@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
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);