Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: don't add as a sub-issue if parent has been removed (#4731)

Aaryan Khandelwal8b6a48f05cbf
diff --git a/web/components/issues/sub-issues/root.tsx b/web/components/issues/sub-issues/root.tsx
index b697ff20a8..45d6119c1e 100644
--- a/web/components/issues/sub-issues/root.tsx
+++ b/web/components/issues/sub-issues/root.tsx
@@ -462,7 +462,9 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
toggleCreateIssueModal(false);
}}
onSubmit={async (_issue: TIssue) => {
- await subIssueOperations.addSubIssue(workspaceSlug, projectId, parentIssueId, [_issue.id]);
+ if (_issue.parent_id) {
+ await subIssueOperations.addSubIssue(workspaceSlug, projectId, parentIssueId, [_issue.id]);
+ }
}}
/>
)}