diff --git a/module/bug/control.php b/module/bug/control.php index 81e358da26..d2ddbfb24d 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -954,7 +954,7 @@ class bug extends control { $objectID = $this->app->tab == 'project' ? $bug->project : $bug->execution; $productBranches = (isset($product->type) and $product->type != 'normal') ? $this->loadModel('execution')->getBranchByProduct($productID, $objectID) : array(); - $branches = isset($productBranches[$productID]) ? $productBranches[$productID] : array(); + $branches = isset($productBranches[$productID]) ? array(BRANCH_MAIN => $this->lang->branch->main) + $productBranches[$productID] : array(); } else { diff --git a/module/story/control.php b/module/story/control.php index b3ed2ea80f..5b47f55529 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -671,7 +671,7 @@ class story extends control { $objectID = $this->app->tab == 'project' ? $this->session->project : $this->session->execution; $productBranches = $product->type != 'normal' ? $this->loadModel('execution')->getBranchByProduct($story->product, $objectID) : array(); - $branches = isset($productBranches[$story->product]) ? $productBranches[$story->product] : array(); + $branches = isset($productBranches[$story->product]) ? array(BRANCH_MAIN => $this->lang->branch->main) + $productBranches[$story->product] : array(); $products = $this->product->getProductPairsByProject($objectID); $this->view->objectID = $objectID; @@ -791,7 +791,7 @@ class story extends control foreach($linkedProducts as $linkedProduct) { $branchList = $this->branch->getPairs($linkedProduct->id, '', $executionID); - $branches[$linkedProduct->id] = $branchList; + $branches[$linkedProduct->id] = array(BRANCH_MAIN => $this->lang->branch->main) + $branchList; $modules[$linkedProduct->id] = $this->tree->getOptionMenu($linkedProduct->id, 'story', 0, array_keys($branchList)); $plans[$linkedProduct->id] = $this->productplan->getBranchPlanPairs($linkedProduct->id, array_keys($branchList), true); if(empty($plans[$linkedProduct->id])) $plans[$linkedProduct->id][0] = $plans[$linkedProduct->id]; diff --git a/module/testcase/control.php b/module/testcase/control.php index f44b272eef..0cf4106843 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -375,7 +375,7 @@ class testcase extends control $product = $this->product->getById($productID); if($this->app->tab == 'execution' or $this->app->tab == 'project') { - $objectID = $this->app->tab == 'project' ? $projectID : $executionID; + $objectID = $this->app->tab == 'project' ? $this->session->project : $executionID; $productBranches = (isset($product->type) and $product->type != 'normal') ? $this->execution->getBranchByProduct($productID, $objectID) : array(); $branches = isset($productBranches[$productID]) ? $productBranches[$productID] : array(); $branch = key($branches);