roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Improve UI For Custom Usage Statistics Queries

Open aaronskiba opened this issue 6 months ago • 0 comments

Summary

The following identifies two areas of the custom date range functionality in the usage statistics UI that could benefit from improvements to better align with how data is generated and interpreted.

Technical Details

1. Limit Start date and End date Selection to Month (not Day)

Each entry in the stats table has a date field in the format YYYY-MM-DD, where DD is always the last day of the month. Allowing users to select arbitrary days can lead to confusion and misleading results. Examples:

  1. A user selects start_date="2025-01-01", end_date="2025-01-30" and the queries the number of users. Even if users joined during this period, the returned result is 0 new users. This is because the stats are all aggregated to date="2025-01-31".
  2. i. A user selects start_date="2025-01-01", end_date="2025-01-31" and queries the number of plans. ii. A user selects start_date="2025-01-01", end_date="2025-02-27" and queries the number of plans. The result returns the same count because the only matching entry is for date="2025-01-31".

Limiting the date selection to months only (e.g., via a month picker) would resolve this and ensure consistency with how the data is stored and queried.

2. Add "Excluding Test Plans" Checkbox

The stats table includes separate type=StatCreatedPlan entries for both filtered=true and filtered=false counts. Currently:

  • The default usage statistics include a "Excluding Test Plans" checkbox, which toggles whether the filtered=true vs filtered=false entries are used from the stats table.
  • The "Excluding Test Plans" checkbox is absent when querying the plan counts by a custom date range.

We should implement the same "Excluding Test Plans" checkbox when querying the plan counts by a custom date range.

aaronskiba avatar Jul 09 '25 19:07 aaronskiba