* Finish task #45157.

This commit is contained in:
liumengyi
2021-11-26 15:04:47 +08:00
parent df2f48128a
commit 0c2b88ae38
2 changed files with 28 additions and 27 deletions
+24
View File
@@ -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.
*