From b1ff89005f3d67c11686d5696f03648d08455e29 Mon Sep 17 00:00:00 2001 From: shubhamsigdar1 Date: Tue, 21 Nov 2023 13:51:44 +0530 Subject: [PATCH] update assign to username for status DONE --- __tests__/Unit/Components/Tasks/Card.test.tsx | 3 ++- src/components/tasks/card/index.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/__tests__/Unit/Components/Tasks/Card.test.tsx b/__tests__/Unit/Components/Tasks/Card.test.tsx index e67c820c7..119a80ecc 100644 --- a/__tests__/Unit/Components/Tasks/Card.test.tsx +++ b/__tests__/Unit/Components/Tasks/Card.test.tsx @@ -274,11 +274,12 @@ describe('Task card', () => { expect(assignToText).toBeInTheDocument(); }); - it('Should not render "Assign to username" button when parent issue has an assignee and is open, the task status is "Completed" and has not been assigned', function () { + it('Should not render "Assign to username" button when parent issue has an assignee and is open, the task status is "Done" and has not been assigned', function () { const PROPS = { ...DEFAULT_PROPS, content: { ...DEFAULT_PROPS.content, + status: 'DONE', assignee: undefined, github: { issue: { diff --git a/src/components/tasks/card/index.tsx b/src/components/tasks/card/index.tsx index 659611a51..f312547f5 100644 --- a/src/components/tasks/card/index.tsx +++ b/src/components/tasks/card/index.tsx @@ -230,7 +230,7 @@ const Card: FC = ({ const hasIssueAssignee = () => cardDetails.github?.issue.assignee ?? false; const hasTaskAssignee = () => cardDetails.assignee ?? false; const isIssueClosed = () => cardDetails.github?.issue?.status === 'closed'; - const isTaskComplete = () => cardDetails.status === COMPLETED; + const isTaskComplete = () => cardDetails.status === DONE; const showAssignButton = () => hasIssueAssignee() &&