UBERF-9264: Fix set/unset parent issue (#7799)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2025-01-27 15:14:54 +05:00
committed by GitHub
parent 83a912d716
commit 331aa7f78f
20 changed files with 133 additions and 51 deletions
@@ -175,6 +175,13 @@
$: taskType = issue?.kind !== undefined ? $taskTypeStore.get(issue?.kind) : undefined
$: projectType = taskType?.parent !== undefined ? $typeStore.get(taskType.parent) : undefined
async function unsetParentIssue (): Promise<void> {
if (issue === undefined || readonly) return
await client.update(issue, { attachedTo: tracker.ids.NoParent })
Analytics.handleEvent(TrackerEvents.IssueParentUnset, { issue: issue.identifier ?? issue._id })
}
</script>
{#if !embedded}
@@ -276,8 +283,22 @@
</svelte:fragment>
{#if hasParentIssue}
<div class="mb-6">
<div class="mb-6 flex-row-center">
<SubIssueSelector {issue} />
{#if !readonly}
<div class="ml-2">
<Button
icon={tracker.icon.UnsetParent}
iconProps={{ size: 'medium' }}
kind={'regular'}
showTooltip={{ label: tracker.string.UnsetParentIssue }}
dataId={'btnUnsetParent'}
on:click={() => {
void unsetParentIssue()
}}
/>
</div>
{/if}
</div>
{/if}
<EditBox