From fdedd7f646056eaa939e7216a0cd00c035fbfcb1 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 25 Mar 2024 10:12:35 +0100 Subject: [PATCH] FilterProcessor: Allow behaviors to finish processing refs https://github.com/Icinga/icingadb-web/issues/1001 --- src/Compat/FilterProcessor.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Compat/FilterProcessor.php b/src/Compat/FilterProcessor.php index 93f6b94..361aabb 100644 --- a/src/Compat/FilterProcessor.php +++ b/src/Compat/FilterProcessor.php @@ -139,6 +139,13 @@ protected function requireAndResolveFilterColumns(Filter\Rule $filter, Query $qu if (! $behaviorsApplied) { $rewrittenFilter = $subjectBehaviors->rewriteCondition($filter, $path . '.'); if ($rewrittenFilter !== null) { + if ( + $rewrittenFilter instanceof MetaDataProvider + && $rewrittenFilter->metaData()->get('forceResolved', false) + ) { + return $rewrittenFilter; + } + return $this->requireAndResolveFilterColumns($rewrittenFilter, $query, $forceOptimization) ?: $rewrittenFilter; }