diff --git a/module/bug/control.php b/module/bug/control.php
index 4c291bcd50..49fd637f6a 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -1044,22 +1044,14 @@ class bug extends control
if($product->type != 'normal')
{
$branches = $this->loadModel('branch')->getPairs($productID);
- if($branch === 'all')
+ foreach($branches as $branchID => $branchName)
{
- $modules[0] = $this->tree->getOptionMenu($productID, 'bug', 0, 0);
- foreach($branches as $branchID => $branchName)
- {
- $modules[$branchID] = $this->tree->getOptionMenu($productID, 'bug', 0, $branchID);
- }
- }
- else
- {
- $modules[$branch] = $this->tree->getOptionMenu($productID, 'bug', 0, $branch);
+ $modules[$productID][$branchID] = $this->tree->getOptionMenu($productID, 'bug', 0, $branchID);
}
}
else
{
- $modules[0] = $this->tree->getOptionMenu($productID, 'bug', 0, 0);
+ $modules[$productID][0] = $this->tree->getOptionMenu($productID, 'bug', 0, 0);
}
/* Set product menu. */
diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php
index b65fd1a536..3cfc8ab2ab 100644
--- a/module/bug/view/batchedit.html.php
+++ b/module/bug/view/batchedit.html.php
@@ -77,16 +77,16 @@
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["assignedTos[$bugID]"] = $this->config->user->moreLink;
if(!$productID)
{
- $product = $this->product->getByID($bug->product);
-
+ $product = $this->product->getByID($bug->product);
$bugBranch = isset($bug->branch) ? $bug->branch : 0;
$plans = $this->loadModel('productplan')->getPairs($bug->product, $branch);
+ $branches = $product->type == 'normal' ? array('' => '') : $this->loadModel('branch')->getPairs($product->id);
- $branches = $product->type == 'normal' ? array('' => '') : $this->loadModel('branch')->getPairs($product->id);
+ $modules[$bug->product][0] = $this->tree->getOptionMenu($bug->product, $viewType = 'case', 0, 0);
if($product->type != 'normal')
{
foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName;
- $modules[$bugBranch] = $this->tree->getOptionMenu($bug->product, $viewType = 'case', 0, $bugBranch);
+ $modules[$bug->product][$bugBranch] = $this->tree->getOptionMenu($bug->product, $viewType = 'case', 0, $bugBranch);
}
}
?>
@@ -116,7 +116,7 @@
branch, "class='form-control chosen' $disabled onchange='setBranchRelated(this.value, $bug->product, $bug->id)'");?>
-
branch], $bug->module, "class='form-control chosen'");?> |
+ product][$bug->branch], $bug->module, "class='form-control chosen'");?> |
' style='overflow:visible'>plan, "class='form-control chosen'");?> |
' style='overflow:visible'>assignedTo, "class='form-control chosen'");?> |
' style='overflow:visible'>deadline, "class='form-control form-date'");?> |
diff --git a/module/story/control.php b/module/story/control.php
index 43dccfa34a..a669f6f03e 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -731,22 +731,14 @@ class story extends control
if($product->type != 'normal')
{
$branches = $this->loadModel('branch')->getPairs($productID);
- if($branch === 'all')
+ foreach($branches as $branchID => $branchName)
{
- $modules[0] = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
- foreach($branches as $branchID => $branchName)
- {
- $modules[$branchID] = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branchID);
- }
- }
- else
- {
- $modules[$branch] = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
+ $modules[$productID][$branchID] = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branchID);
}
}
else
{
- $modules[0] = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
+ $modules[$productID][0] = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
}
$this->view->modules = $modules;
diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php
index cc21916e2c..4aea40a00e 100644
--- a/module/story/view/batchedit.html.php
+++ b/module/story/view/batchedit.html.php
@@ -78,8 +78,8 @@ foreach(explode(',', $showFields) as $field)
foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName;
}
- if(!isset($modules[$story->branch])) $modules[$story->branch] = $this->tree->getOptionMenu($story->product, 'story', 0, $story->branch);
- foreach($modules[$story->branch] as $moduleID => $moduleName) $modules[$story->branch][$moduleID] = '/' . $product->name . $moduleName;
+ if(!isset($modules[$story->product][$story->branch])) $modules[$story->product][$story->branch] = $this->tree->getOptionMenu($story->product, 'story', 0, $story->branch);
+ foreach($modules[$story->product][$story->branch] as $moduleID => $moduleName) $modules[$story->product][$story->branch][$moduleID] = '/' . $product->name . $moduleName;
$productPlans = $this->productplan->getPairs($story->product, $branch);
}
@@ -94,7 +94,7 @@ foreach(explode(',', $showFields) as $field)
'>
- branch], $story->module, "class='form-control chosen'");?>
+ product][$story->branch], $story->module, "class='form-control chosen'");?>
|
'>
|