summaryrefslogtreecommitdiff
path: root/app/Analytic/AverageLeadCycleTimeAnalytic.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Analytic/AverageLeadCycleTimeAnalytic.php')
-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);