User Activity report: "Last Activity" column ignores the selected date-range filter #52

Open
opened 2026-08-31 21:36:19 -04:00 by jared · 0 comments
Owner

Severity: Low

index.php (~lines 391-395): SELECT user_id, MAX(created_at) FROM audit_log GROUP BY user_id — this subquery has no WHERE clause on the selected date range at all, so it always shows true all-time last activity even when the page is filtered to e.g. "last 7 days," inconsistent with every other column on the same report.

Fix: Add the same date-range WHERE clause used by the report's other subqueries, or clearly label the column as "Last Activity (all-time)" if that's the intended behavior.

**Severity:** Low `index.php` (~lines 391-395): `SELECT user_id, MAX(created_at) FROM audit_log GROUP BY user_id` — this subquery has no `WHERE` clause on the selected date range at all, so it always shows true all-time last activity even when the page is filtered to e.g. "last 7 days," inconsistent with every other column on the same report. **Fix:** Add the same date-range `WHERE` clause used by the report's other subqueries, or clearly label the column as "Last Activity (all-time)" if that's the intended behavior.
jared added the priority/lowreliability labels 2026-09-08 10:15:45 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/tinker_tickets#52