BooleanFilter upgrade
The <BooleanFilter
component now supports three states:
true
false
- "Either" which ignores the filter
All Boolean properties in Genesys can be queried by five states:
true
false
-
null
which means "Not provided" and the value in the database for that field isnull
-
notnull
which meanstrue | false
, but notnull
and should be labeled "Either" - I don't care which ignores the filter and needs to be labeled "Don't use filter"
This only applies to entity fields in the Genesys data model that use Boolean
. It does not apply to boolean
(where null
value is impossible).
BooleanFilter upgrade
Add a flag that manages the five state Boolean filtering: <BooleanFilter notNull
. It should default to false
and when provided will disable the five-state filtering and keep the 3 options: Yes, No, I don't care. Example: this applies to historic
filter.
Genesys API supports specifying if a property should be null
using NULL: string[]
and is not null
with NOTNULL: string[]
.
Update BooleanFilter
so that:
-
true
: as is -
false
: as is -
null
: adds property name (actually its JSON path) toNULL: string[]
-
notnull
: adds property name toNOTNULL
- I don't care which ignores the filter: as is
The boolean filter component should ensure that only one of these options is used in the filter sent to the API.
Note: there can be a difference between filter name and the corresponding entity JSON path. Add property fieldName: string
that contains the entity JSON path for the field that is controlled by the filter:
<BooleanFilter name="images" field="foo.bar" ... />
The fieldName
is then used in NULL: string[]
and NOTNULL: string[]
and if not provided it defaults to existing property "name".