* Fix bug #21576.
This commit is contained in:
@@ -2343,6 +2343,8 @@ class taskModel extends model
|
||||
*/
|
||||
public function getUserTaskPairs($account, $status = 'all', $skipExecutionIDList = array())
|
||||
{
|
||||
$deletedProjectIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(1)->fetchPairs('id', 'id');
|
||||
|
||||
$stmt = $this->dao->select('t1.id, t1.name, t2.name as execution')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
|
||||
@@ -2351,6 +2353,7 @@ class taskModel extends model
|
||||
->beginIF($this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi()
|
||||
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
|
||||
->beginIF(!empty($skipExecutionIDList))->andWhere('t1.execution')->notin($skipExecutionIDList)->fi()
|
||||
->beginIF(!empty($deletedProjectIDList))->andWhere('t1.execution')->notin($deletedProjectIDList)->fi()
|
||||
->query();
|
||||
|
||||
$tasks = array();
|
||||
|
||||
Reference in New Issue
Block a user