* adjust for get case step count.

This commit is contained in:
wangyidong
2017-03-20 16:34:17 +08:00
parent 2116e473da
commit 4bfaac292d
+2 -2
View File
@@ -1281,7 +1281,7 @@ class testcaseModel extends model
$steps = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.`case`=t2.`id`')
->where('t1.`case`')->in($caseIdList)
->andWhere('t1.type')->eq('item')
->andWhere('t1.type')->ne('group')
->andWhere('t1.version=t2.version')
->groupBy('t1.`case`')
->fetchPairs('case', 'count');
@@ -1300,7 +1300,7 @@ class testcaseModel extends model
$steps = $this->dao->select('count(distinct t1.id) as count, t1.`case`')->from(TABLE_CASESTEP)->alias('t1')
->leftJoin(TABLE_TESTRUN)->alias('t2')->on('t1.`case`=t2.`case`')
->where('t2.`id`')->in($caseIdList)
->andWhere('t1.type')->eq('item')
->andWhere('t1.type')->ne('group')
->andWhere('t1.version=t2.version')
->groupBy('t1.`case`')
->fetchPairs('case', 'count');