Skip to content
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

[Cases] Do not add already attached alerts to the case #154322

Merged
merged 29 commits into from
Apr 13, 2023

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Apr 4, 2023

Summary

This PR filters out all alerts that are already attached to the selected case. To avoid breaking changes and not confuse the users (trying to find which alert is attached to which case) the UI will not produce any error.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cnasikas cnasikas added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.8.0 labels Apr 4, 2023
@cnasikas cnasikas self-assigned this Apr 4, 2023
@cnasikas cnasikas mentioned this pull request Apr 4, 2023
8 tasks
@cnasikas cnasikas marked this pull request as ready for review April 4, 2023 16:02
@cnasikas cnasikas requested review from a team as code owners April 4, 2023 16:02
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@cnasikas cnasikas requested review from dasansol92 and parkiino April 4, 2023 16:02
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

Copy link
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did I understand correctly that you want to avoid adding an already attached alert to a case multiple times? If yes, should it also work in observability? I tested this scenario, and the case was added multiple times:

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ML changes tested and LGTM

@cnasikas
Copy link
Member Author

cnasikas commented Apr 5, 2023

Did I understand correctly that you want to avoid adding an already attached alert to a case multiple times? If yes, should it also work in observability? I tested this scenario, and the case was added multiple times:

Hey @maryam-saeidi! How did you attach the alerts to the case? This should work only from the bulk actions, not the row actions.

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

@patrykkopycinski patrykkopycinski requested a review from a team as a code owner April 13, 2023 09:32
@patrykkopycinski patrykkopycinski added the ci:skip-cypress-osquery Skips osquery cypress checks label Apr 13, 2023
@patrykkopycinski
Copy link
Contributor

@elasticmachine merge upstream

@cnasikas cnasikas merged commit 9cc51bf into elastic:main Apr 13, 2023
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #7 / cases security and spaces enabled: no_public_base_url push_case incident recorder server should format the comments correctly
  • [job] [logs] Threat Intelligence Tests #4 / Indicators Request inspector when inspector button is clicked "before all" hook for "should render the inspector flyout"
  • [job] [logs] Security Solution Tests #3 / timeline flyout button the (+) button popover menu owns focus

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cases 370.6KB 364.0KB -6.7KB
ml 3.4MB 3.4MB +7.0B
observability 1.1MB 1.1MB +14.0B
osquery 1.1MB 1.1MB +7.0B
securitySolution 15.9MB 15.9MB +96.0B
threatIntelligence 52.3KB 52.3KB +7.0B
triggersActionsUi 1.4MB 1.4MB +752.0B
total -5.8KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
cases 31 32 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
cases 133.6KB 140.7KB +7.1KB
triggersActionsUi 84.0KB 84.1KB +35.0B
total +7.2KB
Unknown metric groups

ESLint disabled line counts

id before after diff
cases 58 57 -1
securitySolution 433 436 +3
total +2

Total ESLint disabled count

id before after diff
cases 76 75 -1
securitySolution 512 515 +3
total +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @cnasikas

@cnasikas cnasikas deleted the prevent_alerts_same_case branch April 13, 2023 14:29
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:skip-cypress-osquery Skips osquery cypress checks Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.