Exclude backlog issues from estimations (#2344)

Signed-off-by: Anton Brechka <anton.brechka@xored.com>
This commit is contained in:
mrsadman99 2022-11-01 22:49:07 +07:00 committed by GitHub
parent 4c1e3b75c9
commit 95eeb37c6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,6 +55,10 @@
$: noParents = issues?.filter((it) => !ids.has(it.attachedTo as Ref<Issue>)) $: noParents = issues?.filter((it) => !ids.has(it.attachedTo as Ref<Issue>))
$: rootNoBacklogIssues = noParents?.filter(
(it) => issueStatuses.get(it.status)?.category !== tracker.issueStatusCategory.Backlog
)
const statuses = createQuery() const statuses = createQuery()
let issueStatuses: Map<Ref<IssueStatus>, WithLookup<IssueStatus>> = new Map() let issueStatuses: Map<Ref<IssueStatus>, WithLookup<IssueStatus>> = new Map()
$: if (noParents !== undefined) { $: if (noParents !== undefined) {
@ -66,7 +70,7 @@
} }
$: totalEstimation = floorFractionDigits( $: totalEstimation = floorFractionDigits(
(noParents ?? [{ estimation: 0, childInfo: [] } as unknown as Issue]) (rootNoBacklogIssues ?? [{ estimation: 0, childInfo: [] } as unknown as Issue])
.map((it) => { .map((it) => {
const cat = issueStatuses.get(it.status)?.category const cat = issueStatuses.get(it.status)?.category
@ -93,7 +97,7 @@
}) })
.reduce((it, cur) => { .reduce((it, cur) => {
return it + cur return it + cur
}), }, 0),
2 2
) )
$: totalReported = floorFractionDigits( $: totalReported = floorFractionDigits(