From dc612ee92198a03e3136c4260519a550189e541e Mon Sep 17 00:00:00 2001 From: Pradip-p Date: Wed, 9 Oct 2024 13:32:07 +0545 Subject: [PATCH] fix: completed task status count --- src/backend/app/projects/project_schemas.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/app/projects/project_schemas.py b/src/backend/app/projects/project_schemas.py index 3ca6575f..9658fdda 100644 --- a/src/backend/app/projects/project_schemas.py +++ b/src/backend/app/projects/project_schemas.py @@ -513,12 +513,13 @@ def calculate_status(cls, values): """Set the project status based on task counts.""" ongoing_task_count = values.ongoing_task_count completed_task_count = values.completed_task_count + total_task_count = values.total_task_count if ongoing_task_count == 0: values.status = "not-started" elif ongoing_task_count > 0 and ongoing_task_count != completed_task_count: values.status = "ongoing" - elif ongoing_task_count == completed_task_count: + elif ongoing_task_count == total_task_count: values.status = "completed" return values