gantt
This commit is contained in:
@ -1,11 +1,17 @@
|
||||
import type { PhaseId, StoryGroup } from '../types/jira'
|
||||
import { statusToPhase } from './statusPhase'
|
||||
import type { LaneLabelsConfig } from './laneDetection'
|
||||
import type { StatusBucketConfig } from './statusBuckets'
|
||||
import { effectivePipelinePhase } from './pipelinePhase'
|
||||
|
||||
export function countSubtasksByPhase(groups: StoryGroup[]): Record<PhaseId, number> {
|
||||
export function countSubtasksByPhase(
|
||||
groups: StoryGroup[],
|
||||
bucketCfg: StatusBucketConfig,
|
||||
laneCfg?: LaneLabelsConfig | null,
|
||||
): Record<PhaseId, number> {
|
||||
const acc: Record<PhaseId, number> = { analyse: 0, design: 0, integration: 0, done: 0 }
|
||||
for (const g of groups) {
|
||||
for (const s of g.subtasks) {
|
||||
const p = statusToPhase(s.fields.status.name)
|
||||
const p = effectivePipelinePhase(s, bucketCfg, laneCfg)
|
||||
acc[p] += 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user