* Finish task 44490.
This commit is contained in:
@@ -207,7 +207,6 @@ class bug extends control
|
||||
|
||||
$showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : '';
|
||||
$productName = ($productID and isset($this->products[$productID])) ? $this->products[$productID] : $this->lang->product->allProduct;
|
||||
|
||||
$product = $this->product->getById($productID);
|
||||
if($product and $product->type != 'normal')
|
||||
{
|
||||
|
||||
@@ -120,7 +120,6 @@ js::set('moduleID', $moduleID);
|
||||
<td>
|
||||
<div class='input-group' id='buildBox'>
|
||||
<span class="input-group-addon"><?php echo $lang->bug->openedBuild?></span>
|
||||
<?php a($builds);?>
|
||||
<?php echo html::select('openedBuild[]', $builds, empty($buildID) ? '' : $buildID, "multiple=multiple class='chosen form-control'");?>
|
||||
<span class='input-group-addon fix-border' id='buildBoxActions'></span>
|
||||
<div class='input-group-btn'><?php echo html::commonButton($lang->bug->allBuilds, "class='btn' id='all' data-toggle='tooltip' onclick='loadAllBuilds()'")?></div>
|
||||
|
||||
@@ -269,6 +269,7 @@ class buildModel extends model
|
||||
*/
|
||||
public function getProductBuildPairs($products, $branch = 0, $params = 'noterminate, nodone', $replace = true)
|
||||
{
|
||||
$branch = str_replace('0,', '', $branch);
|
||||
if($branch == 'all') $branch = 0;
|
||||
$sysBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
@@ -283,10 +284,10 @@ class buildModel extends model
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
|
||||
|
||||
$productBuildss = array();
|
||||
if($branch != 0)
|
||||
{
|
||||
$productBuildss = $this->dao->select('t1.id, t1.name, t1.execution, t2.status as executionStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName')->from(TABLE_BUILD)->alias('t1')
|
||||
$mainProductBuilds = array();
|
||||
$mainProductBuilds = $this->dao->select('t1.id, t1.name, t1.execution, t2.status as executionStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName')->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id')
|
||||
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
|
||||
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
|
||||
@@ -308,7 +309,7 @@ class buildModel extends model
|
||||
if($branch != 0)
|
||||
{
|
||||
$builds = $builds + $sysBuilds;
|
||||
foreach($productBuildss as $key => $build)
|
||||
foreach($mainProductBuilds as $key => $build)
|
||||
{
|
||||
if(empty($build->releaseID) and (strpos($params, 'nodone') !== false) and ($build->executionStatus === 'done')) continue;
|
||||
if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue;
|
||||
@@ -331,8 +332,7 @@ class buildModel extends model
|
||||
foreach($releases as $buildID => $releaseName) $builds[$buildID] = ((strpos($params, 'withbranch') !== false and $productBuilds[$buildID]->branchName) ? $productBuilds[$buildID]->branchName . '/' : '') . $releaseName;
|
||||
}
|
||||
|
||||
if($branch != 0) return $builds;
|
||||
else return $sysBuilds + $builds;
|
||||
return $branch ? $builds : $sysBuilds + $builds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user