* Finish Task #5379,#5398

This commit is contained in:
yfl
2019-04-26 15:00:16 +08:00
parent fdc4d29d3c
commit b47d53fee6
3 changed files with 10 additions and 2 deletions
+7 -1
View File
@@ -1670,7 +1670,13 @@ class bugModel extends model
{
$datas = $this->dao->select('openedBuild as name, count(openedBuild) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('openedBuild')->orderBy('value DESC')->fetchAll('name');
if(!$datas) return array();
$builds = $this->loadModel('build')->getProductBuildPairs($this->session->product, $branch = 0, $params = '');
$products = $this->session->product;
preg_match('/`product` IN \((?P<productIds>.+)\)/', $this->reportCondition(), $matchs);
if(!empty($matchs) and isset($matchs['productIds']))
{
$products = strtr($matchs['productIds'], array('\'' => ''));
}
$builds = $this->loadModel('build')->getProductBuildPairs($products, $branch = 0, $params = '');
/* Deal with the situation that a bug maybe associate more than one openedBuild. */
foreach($datas as $buildIDList => $data)
{