diff options
Diffstat (limited to 'app/Model/ProjectModel.php')
-rw-r--r-- | app/Model/ProjectModel.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/Model/ProjectModel.php b/app/Model/ProjectModel.php index 34e11c13..7382537e 100644 --- a/app/Model/ProjectModel.php +++ b/app/Model/ProjectModel.php @@ -294,10 +294,12 @@ class ProjectModel extends Base public function getColumnStats(array &$project) { $project['columns'] = $this->columnModel->getAll($project['id']); + $project['nb_active_tasks'] = 0; $stats = $this->boardModel->getColumnStats($project['id']); foreach ($project['columns'] as &$column) { $column['nb_tasks'] = isset($stats[$column['id']]) ? $stats[$column['id']] : 0; + $project['nb_active_tasks'] += $column['nb_tasks']; } return $project; |