* finish task #4969.
This commit is contained in:
@@ -2376,19 +2376,13 @@ class projectModel extends model
|
||||
*/
|
||||
public function getKanbanTasks($projectID, $orderBy = 'status_asc, id_desc', $pager = null)
|
||||
{
|
||||
$parents = $this->dao->select('parent')->from(TABLE_TASK)
|
||||
->where('project')->eq((int)$projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('parent')->ne(0)
|
||||
->fetchPairs('parent', 'parent');
|
||||
|
||||
$tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
->where('t1.project')->eq((int)$projectID)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t1.id')->notin($parents)
|
||||
->andWhere('t1.parent')->ge(0)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
|
||||
Reference in New Issue
Block a user