[ML] Fixing anomaly chart empty query bug#246841
Merged
jgowdyelastic merged 10 commits intoelastic:mainfrom Dec 19, 2025
Merged
[ML] Fixing anomaly chart empty query bug#246841jgowdyelastic merged 10 commits intoelastic:mainfrom
jgowdyelastic merged 10 commits intoelastic:mainfrom
Conversation
Contributor
|
Pinging @elastic/ml-ui (:ml) |
20 tasks
| } | ||
|
|
||
| if (filterQuery) { | ||
| if (filterQuery && isPopulatedObject(filterQuery)) { |
Contributor
Member
Author
There was a problem hiding this comment.
I've updated the processFilter function to remove all of the custom filter processing in favour of the core buildEsQuery function.
This fixes the original problem as well as the problem discovered here ^
…elastic/kibana into fixing-anomaly-chart-filter-issue
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
peteharverson
approved these changes
Dec 19, 2025
Contributor
peteharverson
left a comment
There was a problem hiding this comment.
Tested latest changes and LGTM.
If the backport is straightforward, it would be worth putting this in v9.2.4 too.
Contributor
|
Starting backport for target branches: 9.2, 9.3 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Dec 19, 2025
(cherry picked from commit b61dc27)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Dec 19, 2025
(cherry picked from commit b61dc27)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
baileycash-elastic
pushed a commit
to baileycash-elastic/kibana
that referenced
this pull request
Dec 19, 2025
kibanamachine
added a commit
that referenced
this pull request
Dec 23, 2025
# Backport This will backport the following commits from `main` to `9.2`: - [[ML] Fixing anomaly chart empty query bug (#246841)](#246841) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2025-12-19T18:04:50Z","message":"[ML] Fixing anomaly chart empty query bug (#246841)","sha":"b61dc27ea2a90eab266403248a547e3f5ee366ee","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly Detection","backport:version","v9.3.0","v9.4.0","v9.2.4"],"title":"[ML] Fixing anomaly chart empty query bug","number":246841,"url":"https://github.com/elastic/kibana/pull/246841","mergeCommit":{"message":"[ML] Fixing anomaly chart empty query bug (#246841)","sha":"b61dc27ea2a90eab266403248a547e3f5ee366ee"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246841","number":246841,"mergeCommit":{"message":"[ML] Fixing anomaly chart empty query bug (#246841)","sha":"b61dc27ea2a90eab266403248a547e3f5ee366ee"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: James Gowdy <jgowdy@elastic.co>
kibanamachine
added a commit
that referenced
this pull request
Dec 23, 2025
# Backport This will backport the following commits from `main` to `9.3`: - [[ML] Fixing anomaly chart empty query bug (#246841)](#246841) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2025-12-19T18:04:50Z","message":"[ML] Fixing anomaly chart empty query bug (#246841)","sha":"b61dc27ea2a90eab266403248a547e3f5ee366ee","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly Detection","backport:version","v9.3.0","v9.4.0","v9.2.4"],"title":"[ML] Fixing anomaly chart empty query bug","number":246841,"url":"https://github.com/elastic/kibana/pull/246841","mergeCommit":{"message":"[ML] Fixing anomaly chart empty query bug (#246841)","sha":"b61dc27ea2a90eab266403248a547e3f5ee366ee"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246841","number":246841,"mergeCommit":{"message":"[ML] Fixing anomaly chart empty query bug (#246841)","sha":"b61dc27ea2a90eab266403248a547e3f5ee366ee"}},{"branch":"9.2","label":"v9.2.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: James Gowdy <jgowdy@elastic.co>
CAWilson94
pushed a commit
to CAWilson94/kibana
that referenced
this pull request
Jan 6, 2026
dej611
pushed a commit
to dej611/kibana
that referenced
this pull request
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes an issue in the anomaly chart embeddable where the query can become malformed causing the chart to fail to render.
To reproduce: