Skip to content

[Cases] Add the severity field to the cases API#131394

Merged
academo merged 32 commits intoelastic:mainfrom
academo:feature/cases-severity-field
May 5, 2022
Merged

[Cases] Add the severity field to the cases API#131394
academo merged 32 commits intoelastic:mainfrom
academo:feature/cases-severity-field

Conversation

@academo
Copy link
Copy Markdown
Contributor

@academo academo commented May 3, 2022

Summary

Partially addresses #130019

Adds a Severity field to the cases API backend including:

  • default value of "low" for new and existing cases.
  • Migration code for 8.3

Missing in this PR to be done in a follow up PR:

  • Create an user action when the severity field is changed in a case.

Checklist

Delete any items that are not applicable to this PR.

@academo academo requested review from cnasikas and peteharverson May 3, 2022 14:03
@academo academo self-assigned this May 3, 2022
@academo academo added Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// Feature:Cases Cases feature v8.3.0 backport:skip This PR does not require backporting release_note:feature Makes this part of the condensed release notes labels May 3, 2022
@academo academo marked this pull request as ready for review May 4, 2022 07:36
@academo academo requested a review from a team as a code owner May 4, 2022 07:36
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@elasticmachine
Copy link
Copy Markdown
Contributor

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

mikecote and others added 6 commits May 4, 2022 10:46
… "long" in Elasticsearch) (#130819)

* Convert event.duration to string in TypeScript, keep as long in Elasticsearch

* Fix jest test

* Fix functional tests

* Add ecsStringOrNumber to event log schema

* Fix jest test

* Add utility functions to event log plugin

* Use new event log utility functions

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
mgiota and others added 10 commits May 4, 2022 10:46
* Add fix license link

* fix localization

* fix CI error

* fix more translation issues

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* rule state filter

* turn off experiment

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Status filter API call

* Fix tests

* rename state to status, added tests

* Address comments and fix tests

* Revert experiment flag

* Remove unused translations

* Addressed comments

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* [storybook] Watch for changes in packages

* Update default_config.ts
* adjust vega doc

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
@academo academo enabled auto-merge (squash) May 5, 2022 07:35
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cases 406 419 +13

Async chunks

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

id before after diff
cases 290.2KB 290.2KB +70.0B

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 21 22 +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 97.7KB 116.0KB +18.3KB

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/development-plugin-saved-objects.html#_mappings

id before after diff
cases 40 41 +1
Unknown metric groups

ESLint disabled line counts

id before after diff
cases 75 80 +5

Total ESLint disabled count

id before after diff
cases 91 96 +5

History

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

cc @academo

@academo academo merged commit a0294e5 into elastic:main May 5, 2022
kertal pushed a commit to kertal/kibana that referenced this pull request May 24, 2022
* Add severity field to create API and migration

* Adds integration test for severity field migration

* remove exclusive test

* Change severity levels

* Update integration tests for post case

* Add more integration tests

* Fix all cases list test

* Fix some server test

* Fix util server test

* Fix client util test

* Convert event log's duration from number to string in Kibana (keep as "long" in Elasticsearch) (elastic#130819)

* Convert event.duration to string in TypeScript, keep as long in Elasticsearch

* Fix jest test

* Fix functional tests

* Add ecsStringOrNumber to event log schema

* Fix jest test

* Add utility functions to event log plugin

* Use new event log utility functions

* PR fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* filter o11y rule aggregations (elastic#131301)

* [Cloud Posture] Display and save rules per benchmark (elastic#131412)

* Adding aria-label for discover data grid select document checkbox (elastic#131277)

* Update API docs (elastic#130999)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* [CI] Use GCS buckets for bazel remote caching (elastic#131345)

* [Actionable Observability] Add license modal to rules table (elastic#131232)

* Add fix license link

* fix localization

* fix CI error

* fix more translation issues

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* [RAM] Add shareable rule status filter (elastic#130705)

* rule state filter

* turn off experiment

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Status filter API call

* Fix tests

* rename state to status, added tests

* Address comments and fix tests

* Revert experiment flag

* Remove unused translations

* Addressed comments

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>

* [storybook] Watch for changes in packages (elastic#131467)

* [storybook] Watch for changes in packages

* Update default_config.ts

* Improve saved objects migrations failure errors and logs (elastic#131359)

* [Unified observability] Add tour step to guided setup (elastic#131149)

* [Lens] Improved interval input (elastic#131372)

* [Vega] Adjust vega doc for usage of ems files (elastic#130948)

* adjust vega doc

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>

* Excess intersections

* Create severity user action

* Add severity to create_case user action

* Fix and add integration tests

* Minor improvements

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: mgiota <panagiota.mitsopoulou@elastic.co>
Co-authored-by: Jordan <51442161+JordanSh@users.noreply.github.com>
Co-authored-by: Bhavya RM <bhavya@elastic.co>
Co-authored-by: Thomas Neirynck <thomas@elastic.co>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: Jiawei Wu <74562234+JiaweiWu@users.noreply.github.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: Alejandro Fernández Gómez <alejandro.fernandez@elastic.co>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
@cnasikas cnasikas added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:feature Makes this part of the condensed release notes labels May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.