summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Board.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Model/Board.php b/app/Model/Board.php
index b1032e90..0e2cbaaa 100644
--- a/app/Model/Board.php
+++ b/app/Model/Board.php
@@ -252,16 +252,24 @@ class Board extends Base
$swimlanes[$i]['columns'] = $columns;
$swimlanes[$i]['nb_columns'] = $nb_columns;
$swimlanes[$i]['nb_tasks'] = 0;
+ $swimlanes[$i]['nb_swimlanes'] = $ilen;
for ($j = 0; $j < $nb_columns; $j++) {
$column_id = $columns[$j]['id'];
$swimlane_id = $swimlanes[$i]['id'];
+ if (! isset($swimlanes[0]['columns'][$j]['nb_column_tasks'])) {
+ $swimlanes[0]['columns'][$j]['nb_column_tasks'] = 0;
+ $swimlanes[0]['columns'][$j]['total_score'] = 0;
+ }
+
$swimlanes[$i]['columns'][$j]['tasks'] = $callback === null ? $this->taskFinder->getTasksByColumnAndSwimlane($project_id, $column_id, $swimlane_id) : $callback($project_id, $column_id, $swimlane_id);
$swimlanes[$i]['columns'][$j]['nb_tasks'] = count($swimlanes[$i]['columns'][$j]['tasks']);
$swimlanes[$i]['columns'][$j]['score'] = $this->getColumnSum($swimlanes[$i]['columns'][$j]['tasks'], 'score');
$swimlanes[$i]['nb_tasks'] += $swimlanes[$i]['columns'][$j]['nb_tasks'];
+ $swimlanes[0]['columns'][$j]['nb_column_tasks'] += $swimlanes[$i]['columns'][$j]['nb_tasks'];
+ $swimlanes[0]['columns'][$j]['total_score'] += $swimlanes[$i]['columns'][$j]['score'];
}
}