[PR #1845] [MERGED] fix: admin metrics broken #1883

Closed
opened 2026-02-26 20:31:30 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1845
Author: @ephraimduncan
Created: 6/16/2025
Status: Merged
Merged: 6/17/2025
Merged by: @dguyen

Base: mainHead: fix/metrics-broken


📝 Commits (2)

  • d256649 fix: admin metrics broken
  • 860eb44 chore: remove unused queries

📊 Changes

2 files changed (+10 additions, -44 deletions)

View changed files

📝 apps/remix/app/routes/_authenticated+/admin+/stats.tsx (+7 -12)
📝 packages/lib/server-only/admin/get-users-stats.ts (+3 -32)

📄 Description

Description

Fixes MAU (Monthly Active Users) metrics that were broken. The admin dashboard was showing empty charts because the underlying SQL queries were still using the old database schema structure. After the organization migration, documents now belong to teams, and teams belong to organizations, but the MAU queries were still trying to access documents directly from users.

Changes Made

  • Fixed SQL queries in to work with new organization structure

Testing Performed

  • Tested that MAU charts now display actual data instead of empty charts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1845 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 6/16/2025 **Status:** ✅ Merged **Merged:** 6/17/2025 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `fix/metrics-broken` --- ### 📝 Commits (2) - [`d256649`](https://github.com/documenso/documenso/commit/d256649131c2c74477832f5882b5026e7b12740b) fix: admin metrics broken - [`860eb44`](https://github.com/documenso/documenso/commit/860eb447c1d936c787267103f83c0501c7171a08) chore: remove unused queries ### 📊 Changes **2 files changed** (+10 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `apps/remix/app/routes/_authenticated+/admin+/stats.tsx` (+7 -12) 📝 `packages/lib/server-only/admin/get-users-stats.ts` (+3 -32) </details> ### 📄 Description ## Description Fixes MAU (Monthly Active Users) metrics that were broken. The admin dashboard was showing empty charts because the underlying SQL queries were still using the old database schema structure. After the organization migration, documents now belong to teams, and teams belong to organizations, but the MAU queries were still trying to access documents directly from users. ## Changes Made - Fixed SQL queries in to work with new organization structure ## Testing Performed - Tested that MAU charts now display actual data instead of empty charts --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:31:30 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1883
No description provided.