This commit is contained in:
Bastien COIGNOUX
2026-04-24 21:08:34 +02:00
parent 19af51160a
commit 020f5d11de
22 changed files with 2032 additions and 71 deletions

View File

@ -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
}
}