diff --git a/x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/editable_title.test.tsx.snap b/x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/editable_title.test.tsx.snap index 24b1756aade2e..c8d4b6ec3b4c8 100644 --- a/x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/editable_title.test.tsx.snap +++ b/x-pack/legacy/plugins/siem/public/components/header_page/__snapshots__/editable_title.test.tsx.snap @@ -19,6 +19,7 @@ exports[`EditableTitle it renders 1`] = ` aria-label="You can edit Test title by clicking" data-test-subj="editable-title-edit-icon" iconType="pencil" + isDisabled={false} onClick={[Function]} /> diff --git a/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts b/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts index 991e8921e5b81..775a7d7c0acca 100644 --- a/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts +++ b/x-pack/legacy/plugins/siem/public/lib/kibana/hooks.ts @@ -58,6 +58,19 @@ export const useCurrentUser = (): AuthenticatedElasticUser | null => { if (!didCancel) { setUser(convertToCamelCase(response)); } + } else { + setUser({ + username: i18n.translate('xpack.siem.getCurrentUser.unknownUser', { + defaultMessage: 'Unknown', + }), + email: '', + fullName: '', + roles: [], + enabled: false, + authenticationRealm: { name: '', type: '' }, + lookupRealm: { name: '', type: '' }, + authenticationProvider: '', + }); } } catch (error) { if (!didCancel) { diff --git a/x-pack/plugins/case/server/routes/api/cases/push_case.ts b/x-pack/plugins/case/server/routes/api/cases/push_case.ts index 1b24904ce03b7..020dc068d96be 100644 --- a/x-pack/plugins/case/server/routes/api/cases/push_case.ts +++ b/x-pack/plugins/case/server/routes/api/cases/push_case.ts @@ -54,7 +54,6 @@ export function initPushCaseUserActionApi({ client, caseId, options: { - filter: `not ${CASE_COMMENT_SAVED_OBJECT}.attributes.pushed_at: *`, fields: [], page: 1, perPage: 1, @@ -72,7 +71,6 @@ export function initPushCaseUserActionApi({ client, caseId, options: { - filter: `not ${CASE_COMMENT_SAVED_OBJECT}.attributes.pushed_at: *`, fields: [], page: 1, perPage: totalCommentsFindByCases.total, @@ -105,16 +103,18 @@ export function initPushCaseUserActionApi({ }), caseService.patchComments({ client, - comments: comments.saved_objects.map(comment => ({ - commentId: comment.id, - updatedAttributes: { - pushed_at: pushedDate, - pushed_by: { username, full_name, email }, - updated_at: pushedDate, - updated_by: { username, full_name, email }, - }, - version: comment.version, - })), + comments: comments.saved_objects + .filter(comment => comment.attributes.pushed_at == null) + .map(comment => ({ + commentId: comment.id, + updatedAttributes: { + pushed_at: pushedDate, + pushed_by: { username, full_name, email }, + updated_at: pushedDate, + updated_by: { username, full_name, email }, + }, + version: comment.version, + })), }), userActionService.postUserActions({ client,