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 fromcreatedDate
Files Modified:
src/domains/stat/stageTemplates/docsByMonth.ts- Filter and group oncreatedDatesrc/domains/stat/stageTemplates/docsByUser.ts- Date range filter oncreatedDatesrc/domains/stat/stageTemplates/docsByUserByMonth.ts- Filter and month grouping oncreatedDatesrc/domains/stat/stageTemplates/firstDate.ts-$minonDocs.createdDate