* Fix bug #17919.
This commit is contained in:
@@ -167,16 +167,15 @@ class blockModel extends model
|
||||
$data = array();
|
||||
|
||||
$tasks = $this->dao->select('t1.id')->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on("t1.project = t2.id and t2.type = 'project'")
|
||||
->leftJoin(TABLE_PROJECT)->alias('t3')->on("t1.execution = t3.id and (t3.type = 'sprint' or t3.type = 'stage')")
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on("t1.project = t2.id")
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t3')->on("t1.execution = t3.id")
|
||||
->where('t1.assignedTo')->eq($this->app->user->account)
|
||||
->andWhere('t2.status')->ne('suspended')
|
||||
->andWhere('t3.status')->ne('suspended')
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->andWhere('t3.type')->in('sprint,stage')
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->andWhere('(t2.status')->ne('suspended')
|
||||
->orWhere('t3.status')->ne('suspended')
|
||||
->markRight(1)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('t2.deleted')->eq('0')->fi()
|
||||
->andWhere('t3.deleted')->eq('0')
|
||||
->fetchAll('id');
|
||||
$data['tasks'] = isset($tasks) ? count($tasks) : 0;
|
||||
$data['doneTasks'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->andWhere('status')->eq('done')->fetch('count');
|
||||
|
||||
Reference in New Issue
Block a user