From e4a6661e7b56962801581d3a9532d1b2379aa1c3 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 26 Mar 2020 10:47:46 -0400 Subject: [PATCH] LP1813088: Coerce Values to String in egGridValueFilter Coerce values to string in the switch for Boolean columns in the main egGridValueFilter function. This came about after an IRC conversation with Mike Rylander who suggested this as a possible fix. It should when field values are strings, integers, or Booleans. Signed-off-by: Jason Stephenson --- Open-ILS/web/js/ui/default/staff/services/grid.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js index 83a1ebb727..ce84caa657 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -2337,15 +2337,14 @@ angular.module('egGridMod', var GVF = function(value, column, item) { switch(column.datatype) { case 'bool': - switch(value) { - // Browser will translate true/false for us + switch(''+value) { case 't' : case '1' : // legacy - case true: + case 'true': return egStrings.YES; case 'f' : case '0' : // legacy - case false: + case 'false': return egStrings.NO; // value may be null, '', etc. default : return ''; -- 2.11.0