summaryrefslogtreecommitdiff
path: root/app/Analytic
diff options
context:
space:
mode:
Diffstat (limited to 'app/Analytic')
-rw-r--r--app/Analytic/AverageLeadCycleTimeAnalytic.php4
-rw-r--r--app/Analytic/AverageTimeSpentColumnAnalytic.php8
-rw-r--r--app/Analytic/EstimatedTimeComparisonAnalytic.php6
-rw-r--r--app/Analytic/TaskDistributionAnalytic.php4
-rw-r--r--app/Analytic/UserDistributionAnalytic.php4
5 files changed, 13 insertions, 13 deletions
diff --git a/app/Analytic/AverageLeadCycleTimeAnalytic.php b/app/Analytic/AverageLeadCycleTimeAnalytic.php
index 62c83559..d6cd1f86 100644
--- a/app/Analytic/AverageLeadCycleTimeAnalytic.php
+++ b/app/Analytic/AverageLeadCycleTimeAnalytic.php
@@ -3,7 +3,7 @@
namespace Kanboard\Analytic;
use Kanboard\Core\Base;
-use Kanboard\Model\Task;
+use Kanboard\Model\TaskModel;
/**
* Average Lead and Cycle Time
@@ -106,7 +106,7 @@ class AverageLeadCycleTimeAnalytic extends Base
private function getTasks($project_id)
{
return $this->db
- ->table(Task::TABLE)
+ ->table(TaskModel::TABLE)
->columns('date_completed', 'date_creation', 'date_started')
->eq('project_id', $project_id)
->desc('id')
diff --git a/app/Analytic/AverageTimeSpentColumnAnalytic.php b/app/Analytic/AverageTimeSpentColumnAnalytic.php
index 11078323..3556fb9d 100644
--- a/app/Analytic/AverageTimeSpentColumnAnalytic.php
+++ b/app/Analytic/AverageTimeSpentColumnAnalytic.php
@@ -3,7 +3,7 @@
namespace Kanboard\Analytic;
use Kanboard\Core\Base;
-use Kanboard\Model\Task;
+use Kanboard\Model\TaskModel;
/**
* Average Time Spent by Column
@@ -40,7 +40,7 @@ class AverageTimeSpentColumnAnalytic extends Base
private function initialize($project_id)
{
$stats = array();
- $columns = $this->column->getList($project_id);
+ $columns = $this->columnModel->getList($project_id);
foreach ($columns as $column_id => $column_title) {
$stats[$column_id] = array(
@@ -110,7 +110,7 @@ class AverageTimeSpentColumnAnalytic extends Base
*/
private function getTaskTimeByColumns(array &$task)
{
- $columns = $this->transition->getTimeSpentByTask($task['id']);
+ $columns = $this->transitionModel->getTimeSpentByTask($task['id']);
if (! isset($columns[$task['column_id']])) {
$columns[$task['column_id']] = 0;
@@ -144,7 +144,7 @@ class AverageTimeSpentColumnAnalytic extends Base
private function getTasks($project_id)
{
return $this->db
- ->table(Task::TABLE)
+ ->table(TaskModel::TABLE)
->columns('id', 'date_completed', 'date_moved', 'column_id')
->eq('project_id', $project_id)
->desc('id')
diff --git a/app/Analytic/EstimatedTimeComparisonAnalytic.php b/app/Analytic/EstimatedTimeComparisonAnalytic.php
index 490bcd50..d9aea32d 100644
--- a/app/Analytic/EstimatedTimeComparisonAnalytic.php
+++ b/app/Analytic/EstimatedTimeComparisonAnalytic.php
@@ -3,7 +3,7 @@
namespace Kanboard\Analytic;
use Kanboard\Core\Base;
-use Kanboard\Model\Task;
+use Kanboard\Model\TaskModel;
/**
* Estimated/Spent Time Comparison
@@ -22,7 +22,7 @@ class EstimatedTimeComparisonAnalytic extends Base
*/
public function build($project_id)
{
- $rows = $this->db->table(Task::TABLE)
+ $rows = $this->db->table(TaskModel::TABLE)
->columns('SUM(time_estimated) AS time_estimated', 'SUM(time_spent) AS time_spent', 'is_active')
->eq('project_id', $project_id)
->groupBy('is_active')
@@ -40,7 +40,7 @@ class EstimatedTimeComparisonAnalytic extends Base
);
foreach ($rows as $row) {
- $key = $row['is_active'] == Task::STATUS_OPEN ? 'open' : 'closed';
+ $key = $row['is_active'] == TaskModel::STATUS_OPEN ? 'open' : 'closed';
$metrics[$key]['time_spent'] = $row['time_spent'];
$metrics[$key]['time_estimated'] = $row['time_estimated'];
}
diff --git a/app/Analytic/TaskDistributionAnalytic.php b/app/Analytic/TaskDistributionAnalytic.php
index 838652e3..447d88a1 100644
--- a/app/Analytic/TaskDistributionAnalytic.php
+++ b/app/Analytic/TaskDistributionAnalytic.php
@@ -23,10 +23,10 @@ class TaskDistributionAnalytic extends Base
{
$metrics = array();
$total = 0;
- $columns = $this->column->getAll($project_id);
+ $columns = $this->columnModel->getAll($project_id);
foreach ($columns as $column) {
- $nb_tasks = $this->taskFinder->countByColumnId($project_id, $column['id']);
+ $nb_tasks = $this->taskFinderModel->countByColumnId($project_id, $column['id']);
$total += $nb_tasks;
$metrics[] = array(
diff --git a/app/Analytic/UserDistributionAnalytic.php b/app/Analytic/UserDistributionAnalytic.php
index e1815f9c..421d4242 100644
--- a/app/Analytic/UserDistributionAnalytic.php
+++ b/app/Analytic/UserDistributionAnalytic.php
@@ -23,8 +23,8 @@ class UserDistributionAnalytic extends Base
{
$metrics = array();
$total = 0;
- $tasks = $this->taskFinder->getAll($project_id);
- $users = $this->projectUserRole->getAssignableUsersList($project_id);
+ $tasks = $this->taskFinderModel->getAll($project_id);
+ $users = $this->projectUserRoleModel->getAssignableUsersList($project_id);
foreach ($tasks as $task) {
$user = isset($users[$task['owner_id']]) ? $users[$task['owner_id']] : $users[0];