elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.62k stars 8.22k forks source link

[Security Solution] "Clear all" and "Load Query" options from Custom Query filtering component on Detection Rules is adding/removing queries properly #178085

Open vgomez-el opened 8 months ago

vgomez-el commented 8 months ago

Describe the bug:

After loading a saved query (from query menu) on Custom query filtering component when creating/editing a Custom query detection rule, the query is not properly cleared an loading a new one displayed an error. It works fine the second time you try to load a saved query. See attached recording for more details

Kibana/Elasticsearch Stack version:

8.13 BC3

Browser and Browser OS versions:

Google Chrome

Elastic Endpoint version:

Original install method (e.g. download page, yum, from source, etc.): Cloud deployment Functional Area (e.g. Endpoint management, timelines, resolver, etc.):

Detection Rules

Pre-requisites:

User must have a saved custom query.

Steps to reproduce:

  1. Create/edit a Custom query detection rule
  2. Open the query menu on Custom Query component
  3. Navigate to Load query on the dropdown menu and load a saved query
  4. Notice how the query filters are displayed
  5. Navigate again to Query menu
  6. Click on Clear All option from the dropdown
  7. Notice how the query filters are cleared
    1. Navigate again to Load query on the dropdown menu

Current behavior:

The previously loaded saved query remains active, and activating it again throws an error message

Expected behavior:

Active status from query should be cleared after Clearing all

Screenshots (if relevant):

https://github.com/elastic/kibana/assets/120487607/fdaadff7-5006-493f-8df3-648d28b231cf

elasticmachine commented 8 months ago

Pinging @elastic/security-solution (Team: SecuritySolution)

elasticmachine commented 8 months ago

Pinging @elastic/security-detection-engine (Team:Detection Engine)

elasticmachine commented 8 months ago

Pinging @elastic/security-detections-response (Team:Detections and Resp)