You're offline — showing cached data

MC-4632

[auto-review] The 'done today' count for the Home page is calculated using a timezon
2026-06-13 08:48:58 SAST
Home Board MC-4632

[auto-review] The 'done today' count for the Home page is calculated using a timezon

**Severity:** high **Location:** mission-control/models.py:10315 **Flagged by:** gemini **Issue:** The 'done today' count for the Home page is calculated using a timezone-naive...
State Done Next Action Closed Owner Luci Runtime Closed Age 10d ago
MC-4632
Ticket is done; runtime is closed. · cwd /home/lucienne/workspace/state/control-room-worktrees/mc-4632-auto-review-the-done-today-count-for-the-e5c2d5 · uptime 9d 22h · last activity 9d 22h ago

Description

MC-4632
**Severity:** high **Location:** mission-control/models.py:10315 **Flagged by:** gemini **Issue:** The 'done today' count for the Home page is calculated using a timezone-naive SQL `LIKE` query. This will produce counts inconsistent with the Board v2 'Done' column, which uses a new, correct, timezone-aware filter. A ticket completed late in UTC (e.g., 23:30Z) is the next calendar day in SAST, but this query will attribute it to the UTC day, causing the Home page count to disagree with the Board's list of tickets done today. **Suggested fix:** To ensure consistency, the count should use the same timezone-aware logic as the board. Fetch the `completed_at` timestamps for all tickets completed in the last 48 hours and perform the count in Python. First, move the `SAST` timezone object and the `_v2_completed_today` function from `app.py` to a shared utility file or `models.py` itself. Then, replace the `LIKE` query with a query that fetches recent candidate timestamps (e.g., `SELECT completed_at FROM tickets WHERE status = 'done' AND date(completed_at) >= date('now', '-1 day')`) and a Python loop to count them using the shared timezone-aware function. --- Found by mc-auto-review on 2026-06-03 06:02 SAST. Repos reviewed: workspace, mission-control. auto-review-hash: aea0458fa060

Activity

done
Luci is working...
Live
No activity yet
Help