* Finish task #36764.

This commit is contained in:
holan20180123
2021-03-16 14:36:45 +08:00
parent 7fbc4a0e47
commit 07532a914c
10 changed files with 71 additions and 7 deletions
+10
View File
@@ -476,12 +476,20 @@ class bug extends control
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
if(empty($moduleOptionMenu)) die(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
/* Get products and projects. */
$products = $this->products;
if($projectID)
{
$products = array();
$productList = $this->product->getOrderedProducts('all', 40, $projectID);
foreach($productList as $product) $products[$product->id] = $product->name;
$project = $this->loadModel('project')->getByID($projectID);
$projects = array($projectID => $project->name);
}
else
{
$projects = $this->product->getProjectPairsByProduct($productID, $branch);
}
/* Set custom. */
@@ -498,9 +506,11 @@ class bug extends control
$this->view->productName = $this->products[$productID];
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->stories = $stories;
$this->view->projects = $projects;
$this->view->executions = $this->product->getExecutionPairsByProduct($productID, $branch ? "0,$branch" : 0, 'id_desc', $projectID);
$this->view->builds = $builds;
$this->view->moduleID = (int)$moduleID;
$this->view->projectID = $projectID;
$this->view->executionID = $executionID;
$this->view->taskID = $taskID;
$this->view->storyID = $storyID;