From cf9eeea7816c96ba6876f08e453293b5a66e8994 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 13 Aug 2021 12:02:01 -0400 Subject: [PATCH] LP1919465 Fix default holds pull list sorting Signed-off-by: Bill Erickson Signed-off-by: Jennifer Weston Signed-off-by: Chris Sharp --- .../eg2/src/app/staff/share/holds/grid.component.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts b/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts index 06247c10bf..ffd9371f0f 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.ts @@ -167,7 +167,17 @@ export class HoldsGridComponent implements OnInit { } if (!this.defaultSort) { - this.defaultSort = [{name: 'request_time', dir: 'asc'}]; + if (this.pullListOrg) { + + this.defaultSort = [ + {name: 'copy_location_order_position', dir: 'asc'}, + {name: 'acpl_name', dir: 'asc'}, + {name: 'cn_label_sortkey', dir: 'asc'} + ]; + + } else { + this.defaultSort = [{name: 'request_time', dir: 'asc'}]; + } } this.gridDataSource.getRows = (pager: Pager, sort: any[]) => { @@ -303,12 +313,6 @@ export class HoldsGridComponent implements OnInit { subObj[obj.name] = {dir: obj.dir, nulls: 'last'}; orderBy.push(subObj); }); - } else if (this.pullListOrg) { - orderBy.push( - {copy_location_order_position: {dir: 'asc', nulls: 'last'}}, - {acpl_name: {dir: 'asc', nulls: 'last'}}, - {cn_label_sortkey: {dir: 'asc'}} - ); } const limit = this.enablePreFetch ? null : pager.limit; -- 2.11.0