* Fix bug#15988.
This commit is contained in:
@@ -218,12 +218,14 @@ class projectModel extends model
|
||||
->groupBy('root')
|
||||
->fetchAll('root');
|
||||
|
||||
$estimates = $this->dao->select('t2.parent as project, sum(estimate) as estimate')->from(TABLE_TASK)->alias('t1')
|
||||
$condition = $this->config->systemMode == 'classic' ? 't2.id as project' : 't2.parent as project';
|
||||
$estimates = $this->dao->select("$condition, sum(estimate) as estimate")->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
|
||||
->where('t2.parent')->in($projectIdList)
|
||||
->where('t1.parent')->lt(1)
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('t2.parent')->in($projectIdList)->fi()
|
||||
->beginIF($this->config->systemMode == 'classic')->andWhere('t2.id')->in($projectIdList)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t1.parent')->lt(1)
|
||||
->groupBy('project')
|
||||
->fetchAll('project');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user