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

This commit is contained in:
Aaryan Khandelwal 2024-06-07 16:08:21 +05:30 committed by GitHub
parent 1c849103f9
commit 8b6a48f05c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -462,7 +462,9 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
toggleCreateIssueModal(false);
}}
onSubmit={async (_issue: TIssue) => {
if (_issue.parent_id) {
await subIssueOperations.addSubIssue(workspaceSlug, projectId, parentIssueId, [_issue.id]);
}
}}
/>
)}