From b7a7c7e62d0ab7ed348f077bc5e6e219a3c52195 Mon Sep 17 00:00:00 2001 From: Snigdha Sharma Date: Thu, 12 Dec 2024 15:23:02 -0800 Subject: [PATCH 1/2] Update activity message for linked issues --- static/app/types/group.tsx | 1 + static/app/views/issueDetails/groupActivityItem.tsx | 7 +++++++ .../streamline/sidebar/groupActivityItem.tsx | 9 ++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/static/app/types/group.tsx b/static/app/types/group.tsx index a76a20789035fd..a4eb85bb685297 100644 --- a/static/app/types/group.tsx +++ b/static/app/types/group.tsx @@ -642,6 +642,7 @@ export interface GroupActivityCreateIssue extends GroupActivityBase { location: string; provider: string; title: string; + new?: boolean; }; type: GroupActivityType.CREATE_ISSUE; } diff --git a/static/app/views/issueDetails/groupActivityItem.tsx b/static/app/views/issueDetails/groupActivityItem.tsx index 0b874e7ed346e5..2c4b9d83e38d20 100644 --- a/static/app/views/issueDetails/groupActivityItem.tsx +++ b/static/app/views/issueDetails/groupActivityItem.tsx @@ -474,6 +474,13 @@ function GroupActivityItem({ } case GroupActivityType.CREATE_ISSUE: { const {data} = activity; + if (data.new === true) { + return tct('[author] linked this issue to [issue] on [provider]', { + author, + issue: {data.title}, + provider: data.provider, + }); + } return tct('[author] created an issue on [provider] titled [title]', { author, provider: data.provider, diff --git a/static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx b/static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx index a33b875909eb0e..9b9f3ec4df88d2 100644 --- a/static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx @@ -493,8 +493,15 @@ export default function getGroupActivityItem( } case GroupActivityType.CREATE_ISSUE: { const {data} = activity; + let title; + if (data.new === true) { + title = t('Linked Issue'); + } else { + title = t('Created Issue'); + } + return { - title: t('Created Issue'), + title: title, message: tct('by [author] on [provider] titled [title]', { author, provider: data.provider, From c73f996e0717f47d01043bd1fb5d023741521b81 Mon Sep 17 00:00:00 2001 From: Snigdha Sharma Date: Fri, 13 Dec 2024 14:56:25 -0800 Subject: [PATCH 2/2] Update static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx Co-authored-by: Scott Cooper --- .../issueDetails/streamline/sidebar/groupActivityItem.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx b/static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx index 9b9f3ec4df88d2..d1a0613eef782d 100644 --- a/static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx +++ b/static/app/views/issueDetails/streamline/sidebar/groupActivityItem.tsx @@ -493,11 +493,9 @@ export default function getGroupActivityItem( } case GroupActivityType.CREATE_ISSUE: { const {data} = activity; - let title; + let title = t('Created Issue'); if (data.new === true) { title = t('Linked Issue'); - } else { - title = t('Created Issue'); } return {