From 7a3a4bdbe01b1143662fcedfde2a99a99bf96f7b Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Wed, 4 Sep 2024 09:28:09 +0200 Subject: [PATCH] include global properties --- .../hogFunctionConfigurationLogic.tsx | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx index dacfed655a513..2c46f62d4bf4b 100644 --- a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx +++ b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx @@ -36,6 +36,7 @@ import { PipelineTab, PropertyFilterType, PropertyGroupFilter, + PropertyGroupFilterValue, } from '~/types' import { EmailTemplate } from './email-templater/emailTemplaterLogic' @@ -448,10 +449,14 @@ export const hogFunctionConfigurationLogic = kea [s.configuration], (configuration): TrendsQuery => { - const properties: PropertyGroupFilter = { + const seriesProperties: PropertyGroupFilterValue = { type: FilterLogicalOperator.Or, values: [], } + const properties: PropertyGroupFilter = { + type: FilterLogicalOperator.And, + values: [seriesProperties], + } for (const event of configuration.filters?.events ?? []) { const eventProperties: AnyPropertyFilter[] = [...(event.properties ?? [])] if (event.id) { @@ -466,7 +471,7 @@ export const hogFunctionConfigurationLogic = kea 0) { + const globalProperties: PropertyGroupFilterValue = { + type: FilterLogicalOperator.And, + values: [], + } + for (const property of configuration.filters?.properties ?? []) { + globalProperties.values.push(property as AnyPropertyFilter) + } + properties.values.push(globalProperties) + } return { kind: NodeKind.TrendsQuery,