* fix for show bug openedBuild and reslovedBuild.

This commit is contained in:
王怡栋
2022-11-23 14:05:51 +08:00
parent 65e48a1c49
commit af88ae8739
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -227,7 +227,7 @@ class bug extends control
$this->view->product = $product;
$this->view->projectProducts = $this->product->getProducts($this->projectID);
$this->view->productName = $productName;
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $branch);
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $branch, 'nodeletereleased');
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
$this->view->moduleTree = $moduleTree;
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
@@ -933,7 +933,7 @@ class bug extends control
$this->view->branchName = $product->type == 'normal' ? '' : zget($branches, $bug->branch, '');
$this->view->users = $this->user->getPairs('noletter');
$this->view->actions = $this->action->getList('bug', $bugID);
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, 'all', '');
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'nodeletereleased');
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('bug', $bugID);
$this->view->product = $product;
@@ -1079,7 +1079,7 @@ class bug extends control
$this->view->position[] = $this->lang->bug->edit;
/* Assign. */
$allBuilds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty');
$allBuilds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,nodeletereleased');
if($executionID)
{
$openedBuilds = $this->build->getBuildPairs($productID, $bug->branch, 'noempty,noterminate,nodone,withbranch', $executionID, 'execution');
@@ -1933,7 +1933,7 @@ class bug extends control
$this->view->bug = $bug;
$this->view->users = $this->user->getPairs('noclosed', $bug->resolvedBy);
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'noempty');
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'noempty', 0, 'execution', $bug->openedBuild);
$this->view->actions = $this->action->getList('bug', $bugID);
$this->display();
+4 -4
View File
@@ -202,7 +202,7 @@ class buildModel extends model
*
* @param int|array $products
* @param string|int $branch
* @param string $params noempty|notrunk|noterminate|withbranch|hasproject|noDeleted|singled, can be a set of them
* @param string $params noempty|notrunk|noterminate|withbranch|hasproject|noDeleted|singled|nodeletereleased, can be a set of them
* @param string|int $objectID
* @param string $objectType
* @param int|array $buildIdList
@@ -221,8 +221,8 @@ class buildModel extends model
$selectedBuilds = $this->dao->select('id, name')->from(TABLE_BUILD)
->where('id')->in($buildIdList)
->beginIF($products)->andWhere('product')->in($products)->fi()
->beginIF($objectType === 'execution')->andWhere('execution')->eq($objectID)->fi()
->beginIF($objectType === 'project')->andWhere('project')->eq($objectID)->fi()
->beginIF($objectType === 'execution' and $objectID)->andWhere('execution')->eq($objectID)->fi()
->beginIF($objectType === 'project' and $objectID)->andWhere('project')->eq($objectID)->fi()
->fetchPairs();
}
@@ -297,7 +297,7 @@ class buildModel extends model
{
if(!isset($allBuilds[$buildID])) continue;
$build = $allBuilds[$buildID];
unset($builds[$build->date][$buildID]);
if(strpos($params, 'nodeletereleased') === false) unset($builds[$build->date][$buildID]);
}
}
}