-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[ES Query] Fix loading saved query's query in the rule definition #229964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ES Query] Fix loading saved query's query in the rule definition #229964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a unit test for the fix in x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/search_source_expression.test.tsx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline, everything is mocked in that test, so we cannot test this logic there.
|
Pinging @elastic/response-ops (Team:ResponseOps) |
…astic#229964) ## Summary I noticed that the query field is not loaded correctly when we use a saved query in the ES Query rule type, as shown below: ### Before https://github.com/user-attachments/assets/379e1da2-ab4b-4358-b43d-2079fcb6c90c ### After https://github.com/user-attachments/assets/6e44d2d4-a1de-4c9e-aba0-a39690617379
…astic#229964) ## Summary I noticed that the query field is not loaded correctly when we use a saved query in the ES Query rule type, as shown below: ### Before https://github.com/user-attachments/assets/379e1da2-ab4b-4358-b43d-2079fcb6c90c ### After https://github.com/user-attachments/assets/6e44d2d4-a1de-4c9e-aba0-a39690617379
…astic#229964) ## Summary I noticed that the query field is not loaded correctly when we use a saved query in the ES Query rule type, as shown below: ### Before https://github.com/user-attachments/assets/379e1da2-ab4b-4358-b43d-2079fcb6c90c ### After https://github.com/user-attachments/assets/6e44d2d4-a1de-4c9e-aba0-a39690617379
Summary
I noticed that the query field is not loaded correctly when we use a saved query in the ES Query rule type, as shown below:
Before
Screen.Recording.2025-07-30.at.15.25.13.mov
After
Screen.Recording.2025-07-30.at.15.30.03.mov