* Finish task #5443,#5442,#5441

This commit is contained in:
yfl
2019-05-05 08:38:23 +08:00
parent b61f20d071
commit 94aa0ca8a6
14 changed files with 35 additions and 35 deletions
+4 -5
View File
@@ -1670,13 +1670,12 @@ 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();
/* Judge if all product or not. */
$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('\'' => ''));
}
preg_match('/`product` IN \((?P<productIdList>.+)\)/', $this->reportCondition(), $matchs);
if(!empty($matchs) and isset($matchs['productIdList'])) $products = str_replace('\'', '', $matchs['productIdList']);
$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)
{