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] Create package for common utility functions and constants #151649

Open
cnasikas opened this issue Feb 20, 2023 · 2 comments
Open

[Cases] Create package for common utility functions and constants #151649

cnasikas opened this issue Feb 20, 2023 · 2 comments
Labels
Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture

Comments

@cnasikas
Copy link
Member

In PR #150963 we needed to use some Case utility functions and constants in the triggers_actions_ui plugin. Cases require and use the triggers_actions_ui plugin. To avoid circular dependencies we duplicate the code. We should create a package that contains some utility functions and constants (getCaseViewURL, APP_ID, etc) so they can be imported to other plugins and avoid circular dependencies if cases depend on them.

@cnasikas cnasikas added technical debt Improvement of the software architecture and operational architecture Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature labels Feb 20, 2023
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

cnasikas added a commit that referenced this issue Feb 21, 2023
## Summary

This PR adds the cases column to the alerts table. Assumptions:

- I will not change the label of the case column. I will do it on
another PR.
- The column will not be part of the default columns. The user has to
add it from the fields.
- If there are multiple cases they will be shown as a comma-separated
list. It will change later to include a "show more" button or similar to
show only the latest case in the column.
- Due to circular dependencies, Cases types and utility functions were
not imported. I duplicate the code. I opened two issues
(#151648,
#151649) to create packages that
will contain the case types and utility functions.

Issue: #146864

<img width="1649" alt="Screenshot 2023-02-17 at 7 37 25 PM"
src="https://user-images.githubusercontent.com/7871006/219728708-a0922d32-8aaf-4433-88bb-5536f5e6b880.png">

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

## Release notes
Adds the Cases column to the alerts table. The column shows, for each
alert, all cases the alert is attached to.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Cases Cases feature Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

2 participants