Merge branch 'master_xieqiyu_23154' into 'master'
* Fix bug#23154. See merge request easycorp/zentaopms!3731
This commit is contained in:
+13
-2
@@ -982,8 +982,15 @@ class bug extends control
|
||||
$executionID = $bug->execution;
|
||||
$projectID = $bug->project;
|
||||
$currentModuleID = $bug->module;
|
||||
$product = $this->loadModel('product')->getByID($productID);
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
|
||||
if(!isset($this->products[$bug->product]))
|
||||
{
|
||||
$this->products[$bug->product] = $product->name;
|
||||
$this->view->products = $this->products;
|
||||
}
|
||||
|
||||
/* Set the menu. */
|
||||
if($this->app->tab == 'project') $this->loadModel('project')->setMenu($bug->project);
|
||||
if($this->app->tab == 'execution') $this->loadModel('execution')->setMenu($bug->execution);
|
||||
@@ -1010,7 +1017,7 @@ class bug extends control
|
||||
{
|
||||
$products = array();
|
||||
$productList = $this->config->CRProduct ? $this->product->getOrderedProducts('all', 40, $bug->project) : $this->product->getOrderedProducts('normal', 40, $bug->project);
|
||||
foreach($productList as $product) $products[$product->id] = $product->name;
|
||||
foreach($productList as $productInfo) $products[$productInfo->id] = $productInfo->name;
|
||||
$this->view->products = $products;
|
||||
}
|
||||
|
||||
@@ -1020,7 +1027,6 @@ class bug extends control
|
||||
$this->view->position[] = $this->lang->bug->edit;
|
||||
|
||||
/* Assign. */
|
||||
$product = $this->loadModel('product')->getByID($productID);
|
||||
$allBuilds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty');
|
||||
if($executionID)
|
||||
{
|
||||
@@ -1064,6 +1070,11 @@ class bug extends control
|
||||
$branchOption[$branchInfo->id] = $branchInfo->name;
|
||||
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
|
||||
}
|
||||
if(!isset($branchTagOption[$bug->branch]))
|
||||
{
|
||||
$bugBranch = $this->branch->getById($bug->branch, $bug->product, '');
|
||||
$branchTagOption[$bug->branch] = $bug->branch == BRANCH_MAIN ? $bugBranch : ($bugBranch->name . ($bugBranch->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : ''));
|
||||
}
|
||||
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $bug->branch);
|
||||
if(!isset($moduleOptionMenu[$bug->module])) $moduleOptionMenu += $this->tree->getModulesName($bug->module);
|
||||
|
||||
@@ -629,7 +629,8 @@ function loadProductBranches(productID, param)
|
||||
$('#branch').next('.picker').remove();
|
||||
|
||||
var branchStatus = page == 'create' ? 'active' : 'all';
|
||||
var param = "productID=" + productID + "&oldBranch=0¶m=" + branchStatus;
|
||||
var oldBranch = page == 'edit' ? bugBranch : 0;
|
||||
var param = "productID=" + productID + "&oldBranch=" + oldBranch + "¶m=" + branchStatus;
|
||||
if(typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) param += "&projectID=" + objectID;
|
||||
$.get(createLink('branch', 'ajaxGetBranches', param), function(data)
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
js::set('systemMode' , $config->systemMode);
|
||||
js::set('confirmUnlinkBuild' , sprintf($lang->bug->confirmUnlinkBuild, zget($resolvedBuilds, $bug->resolvedBuild)));
|
||||
js::set('tab' , $this->app->tab);
|
||||
js::set('bugBranch' , $bug->branch);
|
||||
if($this->app->tab == 'execution') js::set('objectID', $bug->execution);
|
||||
if($this->app->tab == 'project') js::set('objectID', $bug->project);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user