fix: issue description on last draft issue (#3846)

This commit is contained in:
guru_sainath 2024-02-29 19:41:30 +05:30 committed by GitHub
parent e4988ee940
commit 5cfebb8dae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -100,8 +100,9 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer((prop
const fetchIssueDetail = async (issueId: string | undefined) => { const fetchIssueDetail = async (issueId: string | undefined) => {
if (!workspaceSlug) return; if (!workspaceSlug) return;
if (!projectId || issueId === undefined) { if (!projectId || issueId === undefined) {
setDescription("<p></p>"); setDescription(data?.description_html || "<p></p>");
return; return;
} }
const response = await fetchIssue(workspaceSlug, projectId, issueId, isDraft ? "DRAFT" : "DEFAULT"); const response = await fetchIssue(workspaceSlug, projectId, issueId, isDraft ? "DRAFT" : "DEFAULT");

View File

@ -58,6 +58,7 @@ export const WorkspaceSidebarQuickAction = observer(() => {
const draftIssues = storedValue ?? {}; const draftIssues = storedValue ?? {};
if (workspaceSlug && draftIssues[workspaceSlug]) delete draftIssues[workspaceSlug]; if (workspaceSlug && draftIssues[workspaceSlug]) delete draftIssues[workspaceSlug];
setValue(draftIssues); setValue(draftIssues);
return Promise.resolve();
}; };
return ( return (
@ -66,7 +67,7 @@ export const WorkspaceSidebarQuickAction = observer(() => {
isOpen={isDraftIssueModalOpen} isOpen={isDraftIssueModalOpen}
onClose={() => setIsDraftIssueModalOpen(false)} onClose={() => setIsDraftIssueModalOpen(false)}
data={workspaceDraftIssue ?? {}} data={workspaceDraftIssue ?? {}}
// storeType={storeType} onSubmit={() => removeWorkspaceDraftIssue()}
isDraft={true} isDraft={true}
/> />