diff --git a/module/branch/model.php b/module/branch/model.php
index 68c486dfaf..09b1c7c349 100644
--- a/module/branch/model.php
+++ b/module/branch/model.php
@@ -520,7 +520,7 @@ class branchModel extends model
* @access public
* @return bool
*/
- public function isShowBranch($productID, $moduleID = 0, $executionID = 0)
+ public function showBranch($productID, $moduleID = 0, $executionID = 0)
{
$this->loadModel('product');
if(empty($productID) and empty($moduleID))
diff --git a/module/bug/control.php b/module/bug/control.php
index ddd25ca773..2f4ea11a6e 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -205,7 +205,7 @@ class bug extends control
$product = $this->product->getById($productID);
/* Display of branch label. */
- $isShowBranch = $this->loadModel('branch')->isShowBranch($productID);
+ $showBranch = $this->loadModel('branch')->showBranch($productID);
/* Set view. */
$this->view->title = $productName . $this->lang->colon . $this->lang->bug->common;
@@ -237,7 +237,7 @@ class bug extends control
$this->view->setModule = true;
$this->view->isProjectBug = ($productID and !$this->projectID) ? false : true;
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'bug', $showModule) : array();
- $this->view->isShowBranch = $isShowBranch;
+ $this->view->showBranch = $showBranch;
$this->display();
}
diff --git a/module/caselib/control.php b/module/caselib/control.php
index 80dcf2fbd7..6fd78cb1fc 100644
--- a/module/caselib/control.php
+++ b/module/caselib/control.php
@@ -231,6 +231,7 @@ class caselib extends control
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
$this->view->param = $param;
$this->view->setModule = true;
+ $this->view->showBranch = false;
$this->display();
}
diff --git a/module/common/view/datatable.fix.html.php b/module/common/view/datatable.fix.html.php
index efd1599980..e1bd84adf7 100644
--- a/module/common/view/datatable.fix.html.php
+++ b/module/common/view/datatable.fix.html.php
@@ -104,7 +104,7 @@ $(function()
datatable->showAllModuleList, isset($config->execution->task->allModule) ? $config->execution->task->allModule : 0);?> |
-
+
| datatable->showBranch;?> |
datatable->showBranchList, isset($config->$currentModule->$currentMethod->showBranch) ? $config->$currentModule->$currentMethod->showBranch : 1);?> |
diff --git a/module/execution/control.php b/module/execution/control.php
index bb172fd15d..ab52d012d1 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -222,7 +222,7 @@ class execution extends control
$product = $this->product->getById($productID);
/* Display of branch label. */
- $isShowBranch = $this->loadModel('branch')->isShowBranch($productID, $moduleID, $executionID);
+ $showBranch = $this->loadModel('branch')->showBranch($productID, $moduleID, $executionID);
/* Build the search form. */
$actionURL = $this->createLink('execution', 'task', "executionID=$executionID&status=bySearch¶m=myQueryID");
@@ -261,7 +261,7 @@ class execution extends control
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
$this->view->setModule = true;
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
- $this->view->isShowBranch = $isShowBranch;
+ $this->view->showBranch = $showBranch;
$this->display();
}
@@ -799,7 +799,7 @@ class execution extends control
}
/* Display of branch label. */
- $isShowBranch = $this->loadModel('branch')->isShowBranch($this->cookie->storyProductParam, $this->cookie->storyModuleParam, $executionID);
+ $showBranch = $this->loadModel('branch')->showBranch($this->cookie->storyProductParam, $this->cookie->storyModuleParam, $executionID);
/* Get execution's product. */
$productPairs = $this->loadModel('product')->getProductPairsByProject($executionID);
@@ -831,7 +831,7 @@ class execution extends control
$this->view->setModule = true;
$this->view->branchGroups = $branchGroups;
$this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable.
- $this->view->isShowBranch = $isShowBranch;
+ $this->view->showBranch = $showBranch;
$this->display();
}
diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php
index 08b9cbcedb..0a4d44f9cb 100644
--- a/module/execution/view/story.html.php
+++ b/module/execution/view/story.html.php
@@ -220,8 +220,8 @@
pri?>' title='story->priList, $story->pri, $story->pri);?>'>story->priList, $story->pri, $story->pri);?> |
- config->execution->story->showBranch) ? $this->config->execution->story->showBranch : 1;?>
- product][$story->branch]) and $isShowBranch) echo "" . $branchGroups[$story->product][$story->branch] . '';?>
+ config->execution->story->showBranch) ? $this->config->execution->story->showBranch : 1;?>
+ product][$story->branch]) and $showBranch) echo "" . $branchGroups[$story->product][$story->branch] . '';?>
module) and isset($modulePairs[$story->module])) echo "{$modulePairs[$story->module]} ";?>
parent > 0) echo "{$lang->story->childrenAB}";?>
title, null, "style='color: $story->color' data-app='execution'");?>
diff --git a/module/execution/view/task.html.php b/module/execution/view/task.html.php
index b8254cc885..0a8c91d539 100644
--- a/module/execution/view/task.html.php
+++ b/module/execution/view/task.html.php
@@ -250,7 +250,7 @@ body {margin-bottom: 25px;}
|
- task->printCell($field, $task, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table');?>
+ task->printCell($field, $task, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', false, $showBranch);?>
children)):?>
@@ -258,7 +258,7 @@ body {margin-bottom: 25px;}
children)) ? ' table-child-bottom' : '';?>
- task->printCell($field, $child, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', true);?>
+ task->printCell($field, $child, $users, $browseType, $branchGroups, $modulePairs, $useDatatable ? 'datatable' : 'table', true, $showBranch);?>
diff --git a/module/product/control.php b/module/product/control.php
index c755a3505c..23f9d46f4c 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -212,14 +212,14 @@ class product extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Display of branch label. */
- $isShowBranch = $this->loadModel('branch')->isShowBranch($productID);
+ $showBranch = $this->loadModel('branch')->showBranch($productID);
$product = $this->product->getById($productID);
/* Get stories and branches. */
if($this->app->rawModule == 'projectstory')
{
- $isShowBranch = $this->loadModel('branch')->isShowBranch($productID, 0, $projectID);
+ $showBranch = $this->loadModel('branch')->showBranch($productID, 0, $projectID);
$branches = array();
if(!empty($product))
@@ -309,7 +309,7 @@ class product extends control
$this->view->branch = $branch;
$this->view->branchID = $branchID;
$this->view->branches = $branches;
- $this->view->isShowBranch = $isShowBranch;
+ $this->view->showBranch = $showBranch;
$this->view->storyStages = $this->product->batchGetStoryStage($stories);
$this->view->setModule = true;
$this->view->storyTasks = $storyTasks;
diff --git a/module/task/model.php b/module/task/model.php
index d161627def..92b726f58e 100644
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -3007,11 +3007,12 @@ class taskModel extends model
* @param array $modulePairs
* @param string $mode
* @param bool $child
+ * @param bool $showBranch
*
* @access public
* @return void
*/
- public function printCell($col, $task, $users, $browseType, $branchGroups, $modulePairs = array(), $mode = 'datatable', $child = false)
+ public function printCell($col, $task, $users, $browseType, $branchGroups, $modulePairs = array(), $mode = 'datatable', $child = false, $showBranch = false)
{
$canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($task) ? $task : null);
$canBatchClose = (common::hasPriv('task', 'batchClose', !empty($task) ? $task : null) and strtolower($browseType) != 'closed');
@@ -3070,7 +3071,7 @@ class taskModel extends model
echo "";
break;
case 'name':
- $showBranch = isset($this->config->execution->task->showBranch) ? $this->config->execution->task->showBranch : 1;
+ if($showBranch) $showBranch = isset($this->config->execution->task->showBranch) ? $this->config->execution->task->showBranch : 1;
if($task->parent > 0 and isset($task->parentName)) $task->name = "{$task->parentName} / {$task->name}";
if(!empty($task->product) and isset($branchGroups[$task->product][$task->branch]) and $showBranch) echo "" . $branchGroups[$task->product][$task->branch] . ' ';
if($task->module and isset($modulePairs[$task->module])) echo "" . $modulePairs[$task->module] . ' ';
diff --git a/module/testcase/control.php b/module/testcase/control.php
index 8b7d862e35..2cfd24f23f 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -187,7 +187,7 @@ class testcase extends control
}
/* Display of branch label. */
- $isShowBranch = $this->loadModel('branch')->isShowBranch($productID);
+ $showBranch = $this->loadModel('branch')->showBranch($productID);
$product = $this->product->getById($productID);
@@ -218,7 +218,7 @@ class testcase extends control
$this->view->suiteID = $suiteID;
$this->view->setModule = true;
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array();
- $this->view->isShowBranch = $isShowBranch;
+ $this->view->showBranch = $showBranch;
$this->display();
}