Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(#389): added archived to the calculation of "solved" tickets (#437)

Tim Friedrich4e21e6a6740a
diff --git a/apps/api/src/project/controllers/get-projects.ts b/apps/api/src/project/controllers/get-projects.ts
index d53f43ebc..d6a4f71cc 100644
--- a/apps/api/src/project/controllers/get-projects.ts
+++ b/apps/api/src/project/controllers/get-projects.ts
@@ -13,7 +13,7 @@ async function getProjects(workspaceId: string) {
const projectsWithStatistics = projects.map((project) => {
const totalTasks = project.tasks.length;
const completedTasks = project.tasks.filter(
- (task) => task.status === "done",
+ (task) => task.status === "done" || task.status === "archived",
).length;
const completionPercentage =
totalTasks > 0 ? Math.round((completedTasks / totalTasks) * 100) : 0;