Skip to content

Commit

Permalink
[EDR Workflows] Fix failing attach to case functionality when isolati…
Browse files Browse the repository at this point in the history
…ng/releasing a host (#172912)

(cherry picked from commit a5528e3)
  • Loading branch information
tomsonpl committed Dec 8, 2023
1 parent 645d402 commit 755a5d1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -74,3 +75,10 @@ export const updateCases = async ({
);
}
};

export const EMPTY_COMMENT = i18n.translate(
'xpack.securitySolution.endpoint.updateCases.emptyComment',
{
defaultMessage: 'No comment provided',
}
);

0 comments on commit 755a5d1

Please sign in to comment.