Summary
The analytics work-items page miscounts for any project that renames its states, because it matches on hardcoded English state names instead of the state group.
Where
apps/web/src/pages/AnalyticsWorkItemsPage.tsx. backlogCount/startedCount/unstartedCount/completedCount are computed by getStateName(...) === 'Backlog' | 'In Progress' | 'Todo' | 'Done', and doneStateIds by s.name === 'Done'. States carry a group field ('backlog'|'unstarted'|'started'|'completed'|'cancelled') that other pages use correctly (CyclesPage.getStateGroup). Any project with renamed or custom states (for example "In Review", "Ready") falls into none of the buckets, so every KPI, the projects table, and the Resolved line undercount. The Cancelled column is hardcoded to 0.
Secondary: the Created-vs-Resolved chart buckets "resolved" by updated_at, so a later edit to a completed issue moves its resolution date (same class as the cycle completion chart, #344).
Suggested fix
Bucket by state.group (map each issue's state_id to its group), not by the display name. For the resolved trend, key off an actual completion timestamp once one exists (see #344).
Summary
The analytics work-items page miscounts for any project that renames its states, because it matches on hardcoded English state names instead of the state
group.Where
apps/web/src/pages/AnalyticsWorkItemsPage.tsx.backlogCount/startedCount/unstartedCount/completedCountare computed bygetStateName(...) === 'Backlog' | 'In Progress' | 'Todo' | 'Done', anddoneStateIdsbys.name === 'Done'. States carry agroupfield ('backlog'|'unstarted'|'started'|'completed'|'cancelled') that other pages use correctly (CyclesPage.getStateGroup). Any project with renamed or custom states (for example "In Review", "Ready") falls into none of the buckets, so every KPI, the projects table, and the Resolved line undercount. The Cancelled column is hardcoded to 0.Secondary: the Created-vs-Resolved chart buckets "resolved" by
updated_at, so a later edit to a completed issue moves its resolution date (same class as the cycle completion chart, #344).Suggested fix
Bucket by
state.group(map each issue'sstate_idto its group), not by the display name. For the resolved trend, key off an actual completion timestamp once one exists (see #344).