mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[8.12] [EDR Workflows] Fix failing attach to case functionality when isolating/releasing a host (#172912) (#172968)
# Backport This will backport the following commits from `main` to `8.12`: - [[EDR Workflows] Fix failing attach to case functionality when isolating/releasing a host (#172912)](https://github.com/elastic/kibana/pull/172912) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Tomasz Ciecierski","email":"tomasz.ciecierski@elastic.co"},"sourceCommit":{"committedDate":"2023-12-08T15:54:48Z","message":"[EDR Workflows] Fix failing attach to case functionality when isolating/releasing a host (#172912)","sha":"a5528e3e7ded7ca3388cf552c60de4c30e521781","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Defend Workflows","v8.12.0","v8.13.0","v8.11.3"],"number":172912,"url":"https://github.com/elastic/kibana/pull/172912","mergeCommit":{"message":"[EDR Workflows] Fix failing attach to case functionality when isolating/releasing a host (#172912)","sha":"a5528e3e7ded7ca3388cf552c60de4c30e521781"}},"sourceBranch":"main","suggestedTargetBranches":["8.12","8.11"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172912","number":172912,"mergeCommit":{"message":"[EDR Workflows] Fix failing attach to case functionality when isolating/releasing a host (#172912)","sha":"a5528e3e7ded7ca3388cf552c60de4c30e521781"}},{"branch":"8.11","label":"v8.11.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Tomasz Ciecierski <tomasz.ciecierski@elastic.co>
This commit is contained in:
parent
05871ff18e
commit
3913a86c94
1 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,7 @@ import type { GetRelatedCasesByAlertResponse } from '@kbn/cases-plugin/common';
|
|||
import { AttachmentType } from '@kbn/cases-plugin/common';
|
||||
import type { CasesClient } from '@kbn/cases-plugin/server';
|
||||
import type { BulkCreateArgs } from '@kbn/cases-plugin/server/client/attachments/types';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { APP_ID } from '../../../../../common';
|
||||
import type {
|
||||
ImmutableObject,
|
||||
|
@ -56,7 +57,7 @@ export const updateCases = async ({
|
|||
|
||||
const attachments = caseIDs.map(() => ({
|
||||
type: AttachmentType.actions,
|
||||
comment: createActionPayload.comment || '',
|
||||
comment: createActionPayload.comment || EMPTY_COMMENT,
|
||||
actions: {
|
||||
targets,
|
||||
type: createActionPayload.command,
|
||||
|
@ -74,3 +75,10 @@ export const updateCases = async ({
|
|||
);
|
||||
}
|
||||
};
|
||||
|
||||
export const EMPTY_COMMENT = i18n.translate(
|
||||
'xpack.securitySolution.endpoint.updateCases.emptyComment',
|
||||
{
|
||||
defaultMessage: 'No comment provided',
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue