From 3076ba22dd8346725b4e1ad757532c00df5b18d9 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 2 Jan 2015 17:19:13 -0500 Subject: Fix bugs, improve perfs and use SimpleLogger instead of Monolog --- app/Model/Project.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Model/Project.php') diff --git a/app/Model/Project.php b/app/Model/Project.php index de9408ec..6d8885b1 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -191,11 +191,12 @@ class Project extends Base public function getStats($project_id) { $stats = array(); - $columns = $this->board->getColumns($project_id); $stats['nb_active_tasks'] = 0; + $columns = $this->board->getColumns($project_id); + $column_stats = $this->board->getColumnStats($project_id); foreach ($columns as &$column) { - $column['nb_active_tasks'] = $this->taskFinder->countByColumnId($project_id, $column['id']); + $column['nb_active_tasks'] = isset($column_stats[$column['id']]) ? $column_stats[$column['id']] : 0; $stats['nb_active_tasks'] += $column['nb_active_tasks']; } -- cgit v1.2.3