summaryrefslogtreecommitdiff
path: root/app/Analytic
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-16 19:19:05 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-16 19:19:05 -0500
commit2e4c2b6e0571690e8b8d0488dbb53e3373a86ff5 (patch)
treece725462022d39d8b8088cfdab4dd7e05b396d36 /app/Analytic
parent73ff5ec89b711791b3993f9158dc9554a623602c (diff)
Improve class ProjectDailyColumnStats
Diffstat (limited to 'app/Analytic')
-rw-r--r--app/Analytic/AverageLeadCycleTimeAnalytic.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Analytic/AverageLeadCycleTimeAnalytic.php b/app/Analytic/AverageLeadCycleTimeAnalytic.php
index 96c803cc..fd85f864 100644
--- a/app/Analytic/AverageLeadCycleTimeAnalytic.php
+++ b/app/Analytic/AverageLeadCycleTimeAnalytic.php
@@ -30,7 +30,9 @@ class AverageLeadCycleTimeAnalytic extends Base
'avg_cycle_time' => 0,
);
- foreach ($this->getTasks($project_id) as &$task) {
+ $tasks = $this->getTasks($project_id);
+
+ foreach ($tasks as &$task) {
$stats['count']++;
$stats['total_lead_time'] += $this->calculateLeadTime($task);
$stats['total_cycle_time'] += $this->calculateCycleTime($task);