From d0ab509dab731f1f03cd32d05c49256f9cb30ba2 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 31 Jul 2019 16:15:21 -0400 Subject: [PATCH] LP#1831788: (follow-up) properly handle case where filter value is 0 To test ------- [1] In the sandbox's copy grid, display the status column and filter by the 'Available' status (ccs.id = 0). [2] Verify that the correct rows are returned. Signed-off-by: Galen Charlton Signed-off-by: Jane Sandberg --- .../eg2/src/app/share/grid/grid-filter-control.component.ts | 3 ++- Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts index fbc59186c2..e6a36523dc 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.ts @@ -217,7 +217,8 @@ export class GridFilterControlComponent implements OnInit { if (col.filterOperator === undefined) { col.filterOperator = '='; } if ( (col.filterOperator !== 'null') && (col.filterOperator !== 'not null') && - (!col.filterValue || col.filterValue === '') ) { + (!col.filterValue || col.filterValue === '') && + (col.filterValue != '0') ) { // if value is empty and we're _not_ checking for null/not null, clear // the filter delete this.context.dataSource.filters[col.name]; diff --git a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts index 163a1cb723..a816caffb8 100644 --- a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts @@ -186,7 +186,7 @@ export class SandboxComponent implements OnInit { return this.pcrud.search('acp', query, { flesh: 1, - flesh_fields: {acp: ['location']}, + flesh_fields: {acp: ['location','status']}, offset: pager.offset, limit: pager.limit, order_by: orderBy -- 2.43.2