Skip to content

Commit

Permalink
full query
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Dec 11, 2024
1 parent 81a6f1c commit d6a88f5
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,21 @@ export const hogFunctionConfigurationLogic = kea<hogFunctionConfigurationLogicTy
type: FilterLogicalOperator.And,
values: [seriesProperties],
}
for (const event of configuration.filters?.events ?? []) {
const allPossibleEventFilters = configuration.filters?.events ?? []
const allPossibleActionFilters = configuration.filters?.actions ?? []

if (Array.isArray(configuration.mappings)) {
for (const mapping of configuration.mappings) {
if (mapping.filters?.events) {
allPossibleEventFilters.push(...mapping.filters.events)
}
if (mapping.filters?.actions) {
allPossibleActionFilters.push(...mapping.filters.actions)
}
}
}

for (const event of allPossibleEventFilters) {
const eventProperties: AnyPropertyFilter[] = [...(event.properties ?? [])]
if (event.id) {
eventProperties.push({
Expand All @@ -668,7 +682,7 @@ export const hogFunctionConfigurationLogic = kea<hogFunctionConfigurationLogicTy
values: eventProperties,
})
}
for (const action of configuration.filters?.actions ?? []) {
for (const action of allPossibleActionFilters) {
const actionProperties: AnyPropertyFilter[] = [...(action.properties ?? [])]
if (action.id) {
actionProperties.push({
Expand Down

0 comments on commit d6a88f5

Please sign in to comment.