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) => {
if (!workspaceSlug) return;
if (!projectId || issueId === undefined) {
setDescription("<p></p>");
setDescription(data?.description_html || "<p></p>");
return;
}
const response = await fetchIssue(workspaceSlug, projectId, issueId, isDraft ? "DRAFT" : "DEFAULT");

View File

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