From 5f507f53006b56e5868cb52d7629753be2ce3a25 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Fri, 20 Dec 2024 13:37:18 +0530 Subject: [PATCH] [WEB-2885] fix: retain issue description when creating an issue copy --- web/core/components/issues/issue-modal/base.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/core/components/issues/issue-modal/base.tsx b/web/core/components/issues/issue-modal/base.tsx index 116b22e77b5..ca84d79a019 100644 --- a/web/core/components/issues/issue-modal/base.tsx +++ b/web/core/components/issues/issue-modal/base.tsx @@ -92,7 +92,7 @@ export const CreateUpdateIssueModalBase: React.FC = observer(( useEffect(() => { // fetching issue details - if (isOpen) fetchIssueDetail(data?.id); + if (isOpen) fetchIssueDetail(data?.id ?? data?.sourceIssueId); // if modal is closed, reset active project to null // and return to avoid activeProjectId being set to some other project @@ -115,7 +115,8 @@ export const CreateUpdateIssueModalBase: React.FC = observer(( // clearing up the description state when we leave the component return () => setDescription(undefined); - }, [data, projectId, isOpen, activeProjectId]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [data?.project_id, data?.id, data?.sourceIssueId, projectId, isOpen, activeProjectId]); const addIssueToCycle = async (issue: TIssue, cycleId: string) => { if (!workspaceSlug || !issue.project_id) return;