diff options
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/Analytic.php | 18 | ||||
-rw-r--r-- | app/Controller/Task.php | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/app/Controller/Analytic.php b/app/Controller/Analytic.php index 2413ba92..010fda09 100644 --- a/app/Controller/Analytic.php +++ b/app/Controller/Analytic.php @@ -3,7 +3,7 @@ namespace Controller; /** - * Project Anaytic controller + * Project Analytic controller * * @package controller * @author Frederic Guillot @@ -27,6 +27,22 @@ class Analytic extends Base } /** + * Show average time spent by column + * + * @access public + */ + public function averageTimeByColumn() + { + $project = $this->getProject(); + + $this->response->html($this->layout('analytic/avg_time_columns', array( + 'project' => $project, + 'metrics' => $this->projectAnalytic->getAverageTimeSpentByColumn($project['id']), + 'title' => t('Average time spent into each column for "%s"', $project['name']), + ))); + } + + /** * Show tasks distribution graph * * @access public diff --git a/app/Controller/Task.php b/app/Controller/Task.php index b6e4845f..2d4f783a 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -101,7 +101,7 @@ class Task extends Base 'task' => $task, 'lead_time' => $this->taskAnalytic->getLeadTime($task), 'cycle_time' => $this->taskAnalytic->getCycleTime($task), - 'column_averages' => $this->taskAnalytic->getAverageTimeByColumn($task), + 'time_spent_columns' => $this->taskAnalytic->getTimeSpentByColumn($task), ))); } |