Skip to content

Commit

Permalink
fix(data-warehouse): Fix selecting filter operator on extended person…
Browse files Browse the repository at this point in the history
… props (#25510)
  • Loading branch information
Gilbert09 authored Oct 10, 2024
1 parent 7c1ad70 commit b21cf81
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions frontend/src/lib/components/PropertyFilters/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
AnyPropertyFilter,
CohortPropertyFilter,
CohortType,
DataWarehousePersonPropertyFilter,
DataWarehousePropertyFilter,
ElementPropertyFilter,
EmptyPropertyFilter,
Expand Down Expand Up @@ -220,6 +221,11 @@ export function isGroupPropertyFilter(filter?: AnyFilterLike | null): filter is
export function isDataWarehousePropertyFilter(filter?: AnyFilterLike | null): filter is DataWarehousePropertyFilter {
return filter?.type === PropertyFilterType.DataWarehouse
}
export function isDataWarehousePersonPropertyFilter(
filter?: AnyFilterLike | null
): filter is DataWarehousePropertyFilter {
return filter?.type === PropertyFilterType.DataWarehousePersonProperty
}
export function isFeaturePropertyFilter(filter?: AnyFilterLike | null): filter is FeaturePropertyFilter {
return filter?.type === PropertyFilterType.Feature
}
Expand Down Expand Up @@ -252,7 +258,8 @@ export function isPropertyFilterWithOperator(
| LogEntryPropertyFilter
| FeaturePropertyFilter
| GroupPropertyFilter
| DataWarehousePropertyFilter {
| DataWarehousePropertyFilter
| DataWarehousePersonPropertyFilter {
return (
!isPropertyGroupFilterLike(filter) &&
(isEventPropertyFilter(filter) ||
Expand All @@ -264,7 +271,8 @@ export function isPropertyFilterWithOperator(
isFeaturePropertyFilter(filter) ||
isGroupPropertyFilter(filter) ||
isCohortPropertyFilter(filter) ||
isDataWarehousePropertyFilter(filter))
isDataWarehousePropertyFilter(filter) ||
isDataWarehousePersonPropertyFilter(filter))
)
}

Expand Down

0 comments on commit b21cf81

Please sign in to comment.