summaryrefslogtreecommitdiff
path: root/app/Model/ProjectPaginator.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/ProjectPaginator.php')
-rw-r--r--app/Model/ProjectPaginator.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Model/ProjectPaginator.php b/app/Model/ProjectPaginator.php
index 9f1c39f0..68b216b1 100644
--- a/app/Model/ProjectPaginator.php
+++ b/app/Model/ProjectPaginator.php
@@ -38,9 +38,10 @@ class ProjectPaginator extends Base
foreach ($projects as &$project) {
$project['columns'] = $this->board->getColumns($project['id']);
+ $stats = $this->board->getColumnStats($project['id']);
foreach ($project['columns'] as &$column) {
- $column['nb_tasks'] = $this->taskFinder->countByColumnId($project['id'], $column['id']);
+ $column['nb_tasks'] = isset($stats[$column['id']]) ? $stats[$column['id']] : 0;
}
}