Merge branch 'sprint/zentaopms240_getscrumdata' into 'sprint/zentaopms240'

* Get scrum risk and issue.

See merge request easycorp/zentaopms!5608
This commit is contained in:
王怡栋
2022-09-29 05:48:37 +00:00
+18 -2
View File
@@ -962,7 +962,15 @@ class customModel extends model
*/
public function hasScrumIssueData()
{
if($this->config->edition == 'max') return $this->dao->select('*')->from(TABLE_ISSUE)->where('deleted')->eq('0')->andWhere('execution')->ne(0)->count();
if($this->config->edition == 'max')
{
return $this->dao->select('t1.*')->from(TABLE_ISSUE)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.deleted')->eq('0')
->andWhere('t2.deleted')->eq('0')
->andWhere('t2.model')->eq('scrum')
->count();
}
return false;
}
@@ -974,7 +982,15 @@ class customModel extends model
*/
public function hasScrumRiskData()
{
if($this->config->edition == 'max') return $this->dao->select('*')->from(TABLE_RISK)->where('deleted')->eq('0')->andWhere('execution')->ne(0)->count();
if($this->config->edition == 'max')
{
return $this->dao->select('t1.*')->from(TABLE_RISK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.deleted')->eq('0')
->andWhere('t2.deleted')->eq('0')
->andWhere('t2.model')->eq('scrum')
->count();
}
return false;
}