Merge branch 'sprint/174_songchenxuan_45040' into 'master'

* Finish task #45040.

See merge request easycorp/zentaopms!684
This commit is contained in:
李玉春
2021-12-01 05:24:23 +00:00
4 changed files with 21 additions and 0 deletions
+10
View File
@@ -1022,6 +1022,16 @@ class execution extends control
$type = strtolower($type);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$actionURL = $this->createLink('execution', 'build', "executionID=$executionID&type=bysearch&queryID=myQueryID");
$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);
}
$this->project->buildProjectBuildSearchForm($products, $queryID, $actionURL, 'execution');
/* Get builds. */