* Fix bug#29551.

This commit is contained in:
xieqiyu
2022-11-11 14:34:51 +08:00
parent 6263f5a84f
commit 38dd19a6c3
+2 -1
View File
@@ -1272,15 +1272,16 @@ class execution extends control
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$actionURL = $this->createLink('execution', 'build', "executionID=$executionID&type=bysearch&queryID=myQueryID");
$this->loadModel('build');
$product = $param ? $this->loadModel('product')->getById($param) : '';
if($product and $product->type != 'normal')
{
$this->loadModel('build');
$this->loadModel('branch');
$branches = array(BRANCH_MAIN => $this->lang->branch->main) + $this->branch->getPairs($product->id, '', $executionID);
$this->config->build->search['fields']['branch'] = sprintf($this->lang->build->branchName, $this->lang->product->branchName[$product->type]);
$this->config->build->search['params']['branch'] = array('operator' => '=', 'control' => 'select', 'values' => $branches);
}
if(!$execution->hasProduct) unset($this->config->build->search['fields']['product']);
$this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL, 'execution');
/* Get builds. */