summaryrefslogtreecommitdiff
path: root/app/Analytic
diff options
context:
space:
mode:
Diffstat (limited to 'app/Analytic')
-rw-r--r--app/Analytic/AverageTimeSpentColumnAnalytic.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Analytic/AverageTimeSpentColumnAnalytic.php b/app/Analytic/AverageTimeSpentColumnAnalytic.php
index 820db801..c3cff548 100644
--- a/app/Analytic/AverageTimeSpentColumnAnalytic.php
+++ b/app/Analytic/AverageTimeSpentColumnAnalytic.php
@@ -63,7 +63,9 @@ class AverageTimeSpentColumnAnalytic extends Base
*/
private function processTasks(array &$stats, $project_id)
{
- foreach ($this->getTasks($project_id) as &$task) {
+ $tasks = $this->getTasks($project_id);
+
+ foreach ($tasks as &$task) {
foreach ($this->getTaskTimeByColumns($task) as $column_id => $time_spent) {
if (isset($stats[$column_id])) {
$stats[$column_id]['count']++;