[PR #2083] [MERGED] fix: filter document stats by folder #2040

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/2083
Author: @ephraimduncan
Created: 10/20/2025
Status: Merged
Merged: 10/28/2025
Merged by: @Mythie

Base: mainHead: fix/folder-document-stats


📝 Commits (1)

  • 29b5156 fix: filter document stats by folder

📊 Changes

1 file changed (+16 additions, -8 deletions)

View changed files

📝 packages/lib/server-only/document/get-stats.ts (+16 -8)

📄 Description

This pull request refactors the filtering logic in the getTeamCounts function within get-stats.ts to improve consistency and maintainability. The main change is the consolidation of multiple filter conditions into a single AND clause, which now includes search filters, folder filters, and visibility filters. This ensures that all relevant filters are applied in a unified way for document count queries.


🔄 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/2083 **Author:** [@ephraimduncan](https://github.com/ephraimduncan) **Created:** 10/20/2025 **Status:** ✅ Merged **Merged:** 10/28/2025 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `fix/folder-document-stats` --- ### 📝 Commits (1) - [`29b5156`](https://github.com/documenso/documenso/commit/29b51566ed023dd20b7ea9789d3ea519c310b95d) fix: filter document stats by folder ### 📊 Changes **1 file changed** (+16 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `packages/lib/server-only/document/get-stats.ts` (+16 -8) </details> ### 📄 Description This pull request refactors the filtering logic in the `getTeamCounts` function within `get-stats.ts` to improve consistency and maintainability. The main change is the consolidation of multiple filter conditions into a single `AND` clause, which now includes search filters, folder filters, and visibility filters. This ensures that all relevant filters are applied in a unified way for document count queries. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 20:32:10 +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#2040
No description provided.