[9.3] [ResponseOps][Maintenance Window] Maintenance Window does not apply when using wildcard via Query DSL (#256622)#259303
Merged
georgianaonoleata1904 merged 12 commits intoelastic:9.3from Apr 6, 2026
Conversation
…hen using wildcard via Query DSL (elastic#256622) Closes elastic#252656 Closes elastic#253857 ## Summary Fixed MW alert filtering when using wildcards. - `buildEsQuery()` was called with `undefined` for the index pattern param so the KQL compiler couldn't determine field types - fix: pass a `DataViewBase` with `esTypes` from `alertFieldMap`, enabling correct wildcard handling for keyword fields --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit f26f09a) # Conflicts: # x-pack/platform/plugins/shared/maintenance_windows/moon.yml # x-pack/platform/plugins/shared/maintenance_windows/server/application/methods/create/create_maintenance_window.test.ts # x-pack/platform/plugins/shared/maintenance_windows/server/application/methods/create/create_maintenance_window.ts # x-pack/platform/plugins/shared/maintenance_windows/server/application/methods/update/update_maintenance_window.test.ts # x-pack/platform/plugins/shared/maintenance_windows/server/application/methods/update/update_maintenance_window.ts # x-pack/platform/plugins/shared/maintenance_windows/tsconfig.json
adcoelho
reviewed
Mar 24, 2026
| kql: `kibana.alert.rule.name: ${kqlPattern}`, | ||
| filters: [], | ||
| }, | ||
| scopedQuery: { |
Contributor
There was a problem hiding this comment.
What happened here? This field had a different name?
Are these tests that were added by you in the original PR?
Contributor
Author
There was a problem hiding this comment.
yes, something like this, those tests were using the HTTP body shape (schedule / scope). This function only takes the internal shape: scopedQuery (kql + filters)
Contributor
Author
|
Added fix also for: #259514 to be backported together |
Contributor
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
cnasikas
approved these changes
Apr 6, 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.
Backport
This will backport the following commits from
mainto9.3:Questions ?
Please refer to the Backport tool documentation