summaryrefslogtreecommitdiff
path: root/app/Model/TaskFinder.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/TaskFinder.php')
-rw-r--r--app/Model/TaskFinder.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php
index e007187f..181ff360 100644
--- a/app/Model/TaskFinder.php
+++ b/app/Model/TaskFinder.php
@@ -97,10 +97,16 @@ class TaskFinder extends Base
'tasks.recurrence_parent',
'tasks.recurrence_child',
'tasks.time_estimated',
- 'users.username AS assignee_username',
- 'users.name AS assignee_name'
+ User::TABLE.'.username AS assignee_username',
+ User::TABLE.'.name AS assignee_name',
+ Category::TABLE.'.name AS category_name',
+ Board::TABLE.'.title AS column_name',
+ Project::TABLE.'.name AS project_name'
)
- ->join(User::TABLE, 'id', 'owner_id');
+ ->join(User::TABLE, 'id', 'owner_id', Task::TABLE)
+ ->join(Category::TABLE, 'id', 'category_id', Task::TABLE)
+ ->join(Board::TABLE, 'id', 'column_id', Task::TABLE)
+ ->join(Project::TABLE, 'id', 'project_id', Task::TABLE);
}
/**
@@ -115,11 +121,11 @@ class TaskFinder extends Base
public function getTasksByColumnAndSwimlane($project_id, $column_id, $swimlane_id = 0)
{
return $this->getExtendedQuery()
- ->eq('project_id', $project_id)
- ->eq('column_id', $column_id)
- ->eq('swimlane_id', $swimlane_id)
- ->eq('is_active', Task::STATUS_OPEN)
- ->asc('tasks.position')
+ ->eq(Task::TABLE.'.project_id', $project_id)
+ ->eq(Task::TABLE.'.column_id', $column_id)
+ ->eq(Task::TABLE.'.swimlane_id', $swimlane_id)
+ ->eq(Task::TABLE.'.is_active', Task::STATUS_OPEN)
+ ->asc(Task::TABLE.'.position')
->findAll();
}