Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(activity): Update activity message for linked issues #82064

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions static/app/types/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ export interface GroupActivityCreateIssue extends GroupActivityBase {
location: string;
provider: string;
title: string;
new?: boolean;
};
type: GroupActivityType.CREATE_ISSUE;
}
Expand Down
7 changes: 7 additions & 0 deletions static/app/views/issueDetails/groupActivityItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: <ExternalLink href={data.location}>{data.title}</ExternalLink>,
provider: data.provider,
});
}
return tct('[author] created an issue on [provider] titled [title]', {
author,
provider: data.provider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,13 @@ export default function getGroupActivityItem(
}
case GroupActivityType.CREATE_ISSUE: {
const {data} = activity;
let title = t('Created Issue');
if (data.new === true) {
title = t('Linked Issue');
}

return {
title: t('Created Issue'),
title: title,
message: tct('by [author] on [provider] titled [title]', {
author,
provider: data.provider,
Expand Down
Loading