diff --git a/module/caselib/control.php b/module/caselib/control.php
index 80dcf2fbd7..7971524f50 100644
--- a/module/caselib/control.php
+++ b/module/caselib/control.php
@@ -176,6 +176,9 @@ class caselib extends control
$this->session->set('caseList', $this->app->getURI(true), 'qa');
$this->session->set('caselibList', $this->app->getURI(true), 'qa');
+ /* Display of branch label. */
+ $isShowBranch = $this->loadModel('branch')->isShowBranch(0);
+
/* Set menu. */
$libID = $this->caselib->saveLibState($libID, $libraries);
setcookie('preCaseLibID', $libID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
@@ -231,6 +234,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->isShowBranch = $isShowBranch;
$this->display();
}
diff --git a/module/execution/view/task.html.php b/module/execution/view/task.html.php
index b8254cc885..b7b55d1efb 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, $isShowBranch);?>
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, $isShowBranch);?>
diff --git a/module/task/model.php b/module/task/model.php
index d161627def..46bd886d11 100644
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -3011,7 +3011,7 @@ class taskModel extends model
* @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, $isShowBranch = false)
{
$canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($task) ? $task : null);
$canBatchClose = (common::hasPriv('task', 'batchClose', !empty($task) ? $task : null) and strtolower($browseType) != 'closed');
@@ -3070,9 +3070,9 @@ class taskModel extends model
echo "";
break;
case 'name':
- $showBranch = isset($this->config->execution->task->showBranch) ? $this->config->execution->task->showBranch : 1;
+ if($isShowBranch) $isShowBranch = 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(!empty($task->product) and isset($branchGroups[$task->product][$task->branch]) and $isShowBranch) echo "" . $branchGroups[$task->product][$task->branch] . ' ';
if($task->module and isset($modulePairs[$task->module])) echo "" . $modulePairs[$task->module] . ' ';
if($task->parent > 0) echo '' . $this->lang->task->childrenAB . ' ';
if(!empty($task->team)) echo '' . $this->lang->task->multipleAB . ' ';