* Hide bug plan in waterfall project.
This commit is contained in:
@@ -980,15 +980,22 @@ class execution extends control
|
||||
$type = strtolower($type);
|
||||
$queryID = ($type == 'bysearch') ? (int)$param : 0;
|
||||
$execution = $this->commonAction($executionID);
|
||||
$project = $this->loadModel('project')->getByID($execution->project);
|
||||
$executionID = $execution->id;
|
||||
$products = $this->product->getProducts($execution->id);
|
||||
|
||||
$hasProduct = $this->dao->findByID($execution->project)->from(TABLE_PROJECT)->fetch('hasProduct');
|
||||
if($execution->project and !$hasProduct) unset($this->config->bug->search['fields']['product']);
|
||||
if($execution->project and !$project->hasProduct)
|
||||
{
|
||||
unset($this->config->bug->search['fields']['product']);
|
||||
if($project->model != 'scrum')
|
||||
{
|
||||
unset($this->config->bug->search['fields']['plan']);
|
||||
}
|
||||
}
|
||||
|
||||
$productPairs = array('0' => $this->lang->product->all);
|
||||
foreach($products as $productData) $productPairs[$productData->id] = $productData->name;
|
||||
if($hasProduct) $this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'execution', 'bug', $executionID, $branch);
|
||||
if($project->hasProduct) $this->lang->modulePageNav = $this->product->select($productPairs, $productID, 'execution', 'bug', $executionID, $branch);
|
||||
|
||||
/* Header and position. */
|
||||
$title = $execution->name . $this->lang->colon . $this->lang->execution->bug;
|
||||
@@ -1084,6 +1091,7 @@ class execution extends control
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->users = $users;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->project = $project;
|
||||
$this->view->branchID = empty($this->view->build->branch) ? $branch : $this->view->build->branch;
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
$this->view->type = $type;
|
||||
|
||||
Reference in New Issue
Block a user