Skip to content

Cycle completion chart ignores its date range and buckets by updated_at #344

Description

@cavidelizade

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions