Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.8] [Cases] Fix bug in cases bulk action in the alerts table (#160526…
…) (#160542) # Backport This will backport the following commits from `main` to `8.8`: - [[Cases] Fix bug in cases bulk action in the alerts table (#160526)](#160526) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2023-06-26T15:32:29Z","message":"[Cases] Fix bug in cases bulk action in the alerts table (#160526)\n\n## Summary\n\nIn 8.8 we move the logic of the cases action from solutions to the\nalerts table. A bug was introduced when you try to attach an alert to a\nnew case through the cases modal.\n\nBefore\n\n\nhttps://github.com/elastic/kibana/assets/7871006/771a5d28-e279-43d4-b72e-2dfb6689bae6\n\nError in `console`\n\n```\nUncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')\n at getAttachments (use_bulk_actions.ts:100:1)\n at use_cases_add_to_existing_case_modal.tsx:52:1\n at onRowClick (use_cases_add_to_existing_case_modal.tsx:107:1)\n at all_cases_selector_modal.tsx:36:1\n at all_cases_list.tsx:208:1\n at table_filters.tsx:128:1\n at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)\n at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)\n at invokeGuardedCallback (react-dom.development.js:4056:1)\n at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4070:1)\n```\n\nAfter \n\n\nhttps://github.com/elastic/kibana/assets/7871006/89e44018-49cf-41f7-8e07-01c6eb197624\n\n### Checklist\n\nDelete any items that are not applicable to this PR.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### For maintainers\n\n- [x] This was checked for breaking API changes and was [labeled\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n## Release notes\nFix a bug in the alerts table where you cannot create a new case when\nattaching alerts to a case from the cases modal","sha":"df21ba0e11d24b9e7db70152b6ab421fc10db69c","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:ResponseOps","Feature:Cases","v8.9.0","v8.8.2","v8.10.0"],"number":160526,"url":"#160526 Fix bug in cases bulk action in the alerts table (#160526)\n\n## Summary\n\nIn 8.8 we move the logic of the cases action from solutions to the\nalerts table. A bug was introduced when you try to attach an alert to a\nnew case through the cases modal.\n\nBefore\n\n\nhttps://github.com/elastic/kibana/assets/7871006/771a5d28-e279-43d4-b72e-2dfb6689bae6\n\nError in `console`\n\n```\nUncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')\n at getAttachments (use_bulk_actions.ts:100:1)\n at use_cases_add_to_existing_case_modal.tsx:52:1\n at onRowClick (use_cases_add_to_existing_case_modal.tsx:107:1)\n at all_cases_selector_modal.tsx:36:1\n at all_cases_list.tsx:208:1\n at table_filters.tsx:128:1\n at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)\n at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)\n at invokeGuardedCallback (react-dom.development.js:4056:1)\n at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4070:1)\n```\n\nAfter \n\n\nhttps://github.com/elastic/kibana/assets/7871006/89e44018-49cf-41f7-8e07-01c6eb197624\n\n### Checklist\n\nDelete any items that are not applicable to this PR.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### For maintainers\n\n- [x] This was checked for breaking API changes and was [labeled\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n## Release notes\nFix a bug in the alerts table where you cannot create a new case when\nattaching alerts to a case from the cases modal","sha":"df21ba0e11d24b9e7db70152b6ab421fc10db69c"}},"sourceBranch":"main","suggestedTargetBranches":["8.9","8.8"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"#160526 Fix bug in cases bulk action in the alerts table (#160526)\n\n## Summary\n\nIn 8.8 we move the logic of the cases action from solutions to the\nalerts table. A bug was introduced when you try to attach an alert to a\nnew case through the cases modal.\n\nBefore\n\n\nhttps://github.com/elastic/kibana/assets/7871006/771a5d28-e279-43d4-b72e-2dfb6689bae6\n\nError in `console`\n\n```\nUncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')\n at getAttachments (use_bulk_actions.ts:100:1)\n at use_cases_add_to_existing_case_modal.tsx:52:1\n at onRowClick (use_cases_add_to_existing_case_modal.tsx:107:1)\n at all_cases_selector_modal.tsx:36:1\n at all_cases_list.tsx:208:1\n at table_filters.tsx:128:1\n at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)\n at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)\n at invokeGuardedCallback (react-dom.development.js:4056:1)\n at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4070:1)\n```\n\nAfter \n\n\nhttps://github.com/elastic/kibana/assets/7871006/89e44018-49cf-41f7-8e07-01c6eb197624\n\n### Checklist\n\nDelete any items that are not applicable to this PR.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### For maintainers\n\n- [x] This was checked for breaking API changes and was [labeled\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n## Release notes\nFix a bug in the alerts table where you cannot create a new case when\nattaching alerts to a case from the cases modal","sha":"df21ba0e11d24b9e7db70152b6ab421fc10db69c"}}]}] BACKPORT--> Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
- Loading branch information