From bdb570c00eac177ec2c48594b4d0bb205d396f39 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 21 Nov 2022 09:43:56 +0800 Subject: [PATCH] * Fix bug#29461. --- module/datatable/control.php | 3 +++ module/execution/view/bug.html.php | 2 ++ module/execution/view/story.html.php | 3 +++ module/project/view/bug.html.php | 2 ++ 4 files changed, 10 insertions(+) diff --git a/module/datatable/control.php b/module/datatable/control.php index 7f3d7b1291..5ff84da3f2 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -106,6 +106,7 @@ class datatable extends control if(!$project->multiple) unset($cols['execution']); if(!$project->hasProduct and $project->model != 'scrum') unset($cols['plan']); + if(!$project->hasProduct) unset($cols['branch']); } if($moduleName == 'execution' and $method == 'bug') @@ -113,12 +114,14 @@ class datatable extends control $execution = $this->loadModel('execution')->getByID($this->session->execution); $project = $this->loadModel('project')->getByID($execution->project); if(!$project->hasProduct and $project->model != 'scrum') unset($cols['plan']); + if(!$project->hasProduct) unset($cols['branch']); } if($moduleName == 'execution' and $method == 'story') { $execution = $this->loadModel('execution')->getByID($this->session->execution); if(!$execution->hasProduct and !$execution->multiple) unset($cols['plan']); + if(!$execution->hasProduct) unset($cols['branch']); } $this->view->cols = $cols; diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index 88c458f49d..32aa5c5ac2 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -125,6 +125,7 @@ foreach($setting as $value) { if(!$project->hasProduct and $project->model != 'scrum' and $value->id == 'plan') continue; + if(!$project->hasProduct and $value->id == 'branch') continue; if($value->show) { if(common::checkNotCN() and $value->id == 'severity') $value->name = $lang->bug->severity; @@ -154,6 +155,7 @@ hasProduct and $project->model != 'scrum' and $value->id == 'plan') continue; + if(!$project->hasProduct and $value->id == 'branch') continue; $this->bug->printCell($value, $bug, $users, $builds, $branchOption, $modulePairs, $executions, $plans, $stories, $tasks, $useDatatable ? 'datatable' : 'table', $projectPairs); } ?> diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php index f09acee452..2bb0854b82 100644 --- a/module/execution/view/story.html.php +++ b/module/execution/view/story.html.php @@ -254,6 +254,7 @@ $value) { + if(!$execution->hasProduct and $value->id == 'branch') continue; if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue; if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue; if(!$execution->hasProduct and !$execution->multiple and $storyType == 'requirement' and $value->id == 'taskCount') continue; @@ -274,6 +275,7 @@ $value) { + if(!$execution->hasProduct and $value->id == 'branch') continue; if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue; if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue; if(!$execution->hasProduct and !$execution->multiple and $storyType == 'requirement' and $value->id == 'taskCount') continue; @@ -290,6 +292,7 @@ $value) { + if(!$execution->hasProduct and $value->id == 'branch') continue; if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue; if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue; if(!$execution->hasProduct and !$execution->multiple and $storyType == 'requirement' and $value->id == 'taskCount') continue; diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 44d489418a..2efb621a8e 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -99,6 +99,7 @@ foreach($setting as $key => $value) { if(!$project->hasProduct and $project->model != 'scrum' and $value->id == 'plan') continue; + if(!$project->hasProduct and $value->id == 'branch') continue; if($value->show) { @@ -119,6 +120,7 @@ hasProduct and $project->model != 'scrum' and $value->id == 'plan') continue; + if(!$project->hasProduct and $value->id == 'branch') continue; $this->bug->printCell($value, $bug, $users, $builds, $branchOption, $modulePairs, $executions, $plans, $stories, $tasks, $useDatatable ? 'datatable' : 'table', $projectPairs); } ?>