* adjust for performance issue.

This commit is contained in:
wangyidong
2022-04-25 08:55:03 +08:00
parent c2f6b3220a
commit 0705daa805
3 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -1570,7 +1570,7 @@ class bugModel extends model
public function getUserBugPairs($account, $appendProduct = true, $limit = 0, $skipProductIDList = array(), $skipExecutionIDList = array(), $appendBugID = 0)
{
$deletedProjectIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(1)->fetchPairs('id', 'id');
$bugs = array();
$stmt = $this->dao->select('t1.id, t1.title, t2.name as product')
->from(TABLE_BUG)->alias('t1')
@@ -1894,6 +1894,7 @@ class bugModel extends model
*/
public function getStoryBugCounts($stories, $executionID = 0)
{
if(empty($stories)) return array();
$bugCounts = $this->dao->select('story, COUNT(*) AS bugs')
->from(TABLE_BUG)
->where('story')->in($stories)