SubIssues status another project fix (#2904)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-04-06 11:52:56 +07:00
committed by GitHub
parent 934ada1fb8
commit 93bc04843f
2 changed files with 19 additions and 0 deletions
@@ -34,6 +34,7 @@
export let component: Ref<Component> | null = null
export let subIssues: IssueDraft[] = []
export let shouldSaveDraft: boolean = false
let lastProject = project
let isCollapsed = false
let isCreating = $draftsStore[tracker.ids.IssueDraftChild] !== undefined
@@ -48,6 +49,18 @@
}
}
$: onProjectChange(project)
function onProjectChange (project: Project | undefined) {
if (lastProject?._id === project?._id) return
lastProject = project
if (project === undefined) return
subIssues.forEach((p) => {
p.status = project.defaultIssueStatus
p.space = project._id
})
}
const client = getClient()
export async function save (parents: IssueParentInfo[]) {
@@ -233,3 +233,9 @@
</div>
</div>
</div>
<style lang="scss">
.antiPopup {
max-width: 100%;
}
</style>