+ adjust style for testtask and other

This commit is contained in:
pengjiangxiu
2017-03-15 15:04:33 +08:00
parent 4b2f35c6c6
commit f3e07b735e
13 changed files with 216 additions and 221 deletions
+3 -1
View File
@@ -1334,15 +1334,17 @@ class bugModel extends model
* Get counts of some stories' bugs.
*
* @param array $stories
* @param int $projectID
* @access public
* @return int
*/
public function getStoryBugCounts($stories)
public function getStoryBugCounts($stories, $projectID = 0)
{
$bugCounts = $this->dao->select('story, COUNT(*) AS bugs')
->from(TABLE_BUG)
->where('story')->in($stories)
->andWhere('deleted')->eq(0)
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->groupBy('story')
->fetchPairs();
foreach($stories as $storyID) if(!isset($bugCounts[$storyID])) $bugCounts[$storyID] = 0;