From 0dce67b149b1a517d6e4f3cc90859e6592916149 Mon Sep 17 00:00:00 2001 From: rahulramesha <71900764+rahulramesha@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:57:01 +0530 Subject: [PATCH] fix to use the correct created by while checking if the current user is the creator of the inbox issue (#5422) --- web/core/components/inbox/content/inbox-issue-header.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/core/components/inbox/content/inbox-issue-header.tsx b/web/core/components/inbox/content/inbox-issue-header.tsx index f62de095c..6384b4e9b 100644 --- a/web/core/components/inbox/content/inbox-issue-header.tsx +++ b/web/core/components/inbox/content/inbox-issue-header.tsx @@ -85,8 +85,7 @@ export const InboxIssueActionsHeader: FC = observer((p const canMarkAsDeclined = isAllowed && (inboxIssue?.status === 0 || inboxIssue?.status === -2); // can delete only if admin or is creator of the issue const canDelete = - (!!currentProjectRole && currentProjectRole >= EUserProjectRoles.ADMIN) || - inboxIssue?.created_by === currentUser?.id; + (!!currentProjectRole && currentProjectRole >= EUserProjectRoles.ADMIN) || issue?.created_by === currentUser?.id; const isAcceptedOrDeclined = inboxIssue?.status ? [-1, 1, 2].includes(inboxIssue.status) : undefined; // days left for snooze const numberOfDaysLeft = findHowManyDaysLeft(inboxIssue?.snoozed_till);