* Fix bug #16533.
This commit is contained in:
+3
-11
@@ -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. */
|
||||
|
||||
@@ -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 @@
|
||||
<?php echo html::select("branches[$bugID]", $branches, $bug->branch, "class='form-control chosen' $disabled onchange='setBranchRelated(this.value, $bug->product, $bug->id)'");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo html::select("modules[$bugID]", $modules[$bug->branch], $bug->module, "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select("modules[$bugID]", $modules[$bug->product][$bug->branch], $bug->module, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bug->plan, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bug->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', ' hidden')?>' style='overflow:visible'><?php echo html::input("deadlines[$bugID]", $bug->deadline, "class='form-control form-date'");?></td>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'module')?>'>
|
||||
<?php echo html::select("modules[$storyID]", $modules[$story->branch], $story->module, "class='form-control chosen'");?>
|
||||
<?php echo html::select("modules[$storyID]", $modules[$story->product][$story->branch], $story->module, "class='form-control chosen'");?>
|
||||
</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>'>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user