elastic / kibana

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

[Security Solution] Tags Filter and filtered rules not updating when selected tag is deleted #139732

Open jpdjere opened 2 years ago

jpdjere commented 2 years ago

Describe the bug

GIVEN one or more custom rules with a custom tag GIVEN the rules table is filtered by that custom tag WHEN deleting that tag with a bulk delete tag action from all the rules that tag is applied to THEN the tag should disappear from the tags filter (as the tag is not applied to any rules anymore) AND the Tags Filter Dropdown should update to no longer having that tag selected

However, this doesn't happen until the selected custom tag is manually unselected from the Tags filter dropdown.

To Reproduce Steps to reproduce the behavior:

  1. Create two custom rules
  2. Apply to both a custom tag
  3. Filter the rules table by that custom tag. You should see only those two rules (the rest are filtered out)
  4. Select both rules and Bulk Delete that Tag.
  5. The tag will be successfully deleted but both the Rules Table and the Tags filter won't be updated.

Expected behavior

Once the custom tag is deleted from all rules it is applied to, the Tags Filter Dropdown should update:

  1. The custom tag should not be present in the filter dropdown
  2. The filter dropdown should not have the custom tag selected anymore
  3. Rules table should be updated to reflect new selection of filtered rules

Screenshots

https://user-images.githubusercontent.com/5354282/187469104-4bc5edb3-a9ea-439f-ab16-1d5695a13576.mov

elasticmachine commented 2 years ago

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

elasticmachine commented 2 years ago

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

banderror commented 2 years ago

Needs UX design consultation. Could be something we're ok with.

cybersecdiva commented 1 year ago

Tested in current 8.7.0 deployment:

Preconditions:

Steps to reproduce behavior:

  1. Create two or more custom rules
  2. In the Rules tab -> Select two or more of the custom rules
  3. Click on the Bulk actions drop down arrow list 🔽
  4. Under Options Click on the Tags right arrow icon ➡️ and select Add tags
  5. Flyout menu of Add tags will display and add a custom tag and click Save . In this case, the custom tag added is "tagtest"
  6. Click on Clear filters button (8.7.0+ has this option).
  7. Navigate to the Tags drop down arrow list 🔽, enter the custom tag in the search box. My custom tag is "tagtest"
  8. Select custom tag and the results will show Filtered Rules with the custom tag "tagtest"
  9. Tags section will have "1" displayed in the Menu which indicates the number of filtered tags
  10. Select all the custom rules and click on Bulk actions drop down list 🔽
  11. Under Options Click on the Tags right arrow icon ➡️ and select Delete tags
  12. Flyout menu of Delete tags will display and enter the custom tag to delete and click Save . In this case, the custom tag deleted is "tagtest"

Results:

The Rules with the custom tag still shows and the Tags section still has the "1" displayed in the Menu and the drop down list 🔽 still shows the deleted tag

Expected results:

The Rules with the deleted tag will update and not show in the UI and the Tags section will no longer have the "1" displayed in the menu and the drop down list 🔽 will not show deleted tag.

Screen video capture:

https://user-images.githubusercontent.com/35679937/230485857-be3cc346-2c14-4509-834e-0561d72aaca2.mp4

Observations:

Screenshot 2023-04-06 at 4 17 28 PM Screenshot 2023-04-06 at 4 10 49 PM

Conclusion:

cc: @MadameSheema Update FYI Observations

pborgonovi commented 1 month ago

Validated latest BC 8.15 and it's still present:

https://github.com/user-attachments/assets/4a03f803-80cd-4b6b-9383-cf520d6d1ab0