This commit is contained in:
tianshujie
2021-11-22 13:45:44 +08:00
parent d272f1e392
commit 69842996d6
4 changed files with 14 additions and 30 deletions
+3 -11
View File
@@ -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. */
+5 -5
View File
@@ -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>
+3 -11
View File
@@ -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;
+3 -3
View File
@@ -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