* Finish task #45157.
This commit is contained in:
@@ -2192,6 +2192,30 @@ class taskModel extends model
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* get suspended tasks of a user
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserSuspendedTasks($account)
|
||||
{
|
||||
$tasks = $this->dao->select('t1.*')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution=t2.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project=t3.id')
|
||||
->where('t1.assignedTo')->eq($this->app->user->account)
|
||||
->andWhere('(t2.status')->eq('suspended')
|
||||
->orWhere('t3.status')->eq('suspended')
|
||||
->markRight(1)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->fetchAll('id');
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get task pairs of a story.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user