Summary
The cycle completion chart ignores the date range it's given and buckets completions by updated_at, so any later edit to a completed issue moves its completion bar to the edit day.
Where
CycleStore.CycleCompletionChart (apps/api/internal/store/cycle.go) takes startDate and endDate but the SQL never references them, so completions on any date are returned despite the "per day within the cycle's range" comment. It also buckets by TO_CHAR(i.updated_at, ...). There's no completed_at or activity-based date, so updated_at is standing in for completion time.
Repro
Complete an issue during the cycle, then edit its title a week later. The burnup chart shows the completion on the edit day, possibly outside the cycle window.
Fix
Filter by the passed date range, and bucket by an actual completion timestamp (a completed_at column or the state-change activity) rather than updated_at.
Summary
The cycle completion chart ignores the date range it's given and buckets completions by
updated_at, so any later edit to a completed issue moves its completion bar to the edit day.Where
CycleStore.CycleCompletionChart(apps/api/internal/store/cycle.go) takesstartDateandendDatebut the SQL never references them, so completions on any date are returned despite the "per day within the cycle's range" comment. It also buckets byTO_CHAR(i.updated_at, ...). There's nocompleted_ator activity-based date, soupdated_atis standing in for completion time.Repro
Complete an issue during the cycle, then edit its title a week later. The burnup chart shows the completion on the edit day, possibly outside the cycle window.
Fix
Filter by the passed date range, and bucket by an actual completion timestamp (a
completed_atcolumn or the state-change activity) rather thanupdated_at.