Skip to main content
Version: 1.1.0

fix-stats-use-created-date

🐛 Bug Fixes

Stats use createdDate instead of legacy created

Goal: Include v2/neo-ingested documents in stats dashboards and date pickers.

Solution: Stats aggregation pipelines filter and group on createdDate instead of legacy created. All documents in production have createdDate (verified).

Features:

  • /stats/documents/:level — monthly counts include neo-ingested docs
  • /stats/users/:level — per-user counts in date range
  • /stats/coworkers/:level — per-user monthly evolution
  • /stats/first-document-date/:level — earliest date from createdDate

Files Modified:

  • src/domains/stat/stageTemplates/docsByMonth.ts - Filter and group on createdDate
  • src/domains/stat/stageTemplates/docsByUser.ts - Date range filter on createdDate
  • src/domains/stat/stageTemplates/docsByUserByMonth.ts - Filter and month grouping on createdDate
  • src/domains/stat/stageTemplates/firstDate.ts - $min on Docs.createdDate