From d808b28d2ec7375437779a6d80f8eb3f587f3a6f Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 11 Oct 2022 10:14:04 +0800 Subject: [PATCH] * Hide the plan field on the linkStory page of the execution module. --- module/execution/control.php | 9 --------- module/execution/model.php | 2 +- module/execution/view/linkstory.html.php | 8 ++------ 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 30824f5c7d..c86930d783 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -858,15 +858,6 @@ class execution extends control } } - $projectID = $execution->project; - $project = $this->loadModel('project')->getByID($projectID); - - if(empty($project->hasProduct)) - { - unset($this->config->product->search['fields']['product']); - if($project->model != 'scrum') unset($this->config->product->search['fields']['plan']); - } - $this->execution->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'executionStory', $execution); /* Header and position. */ diff --git a/module/execution/model.php b/module/execution/model.php index 1d065db85b..1a6f315ade 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2248,7 +2248,7 @@ class executionModel extends model { unset($this->config->product->search['fields']['product']); - if($project->model == 'kanban') unset($this->config->product->search['fields']['plan']); + if($project->model != 'kanban') unset($this->config->product->search['fields']['plan']); } $this->loadModel('search')->setSearchParams($this->config->product->search); diff --git a/module/execution/view/linkstory.html.php b/module/execution/view/linkstory.html.php index f4687f63c3..dccd6cc427 100644 --- a/module/execution/view/linkstory.html.php +++ b/module/execution/view/linkstory.html.php @@ -47,9 +47,7 @@ story->product;?> story->module;?> - hasProduct || (!$project->hasProduct && $project->model != 'kanban')):?> - story->plan;?> - + '>story->plan;?> story->stage;?> hasProduct && $productType != 'normal'):?> product->branchName[$productType];?> @@ -85,9 +83,7 @@ createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name);?> '>module, '')?> - hasProduct || (!$project->hasProduct && $project->model != 'kanban')):?> - planTitle;?> - + ' title='planTitle;?>'>planTitle;?> story->stageList, $story->stage);?> hasProduct && $productType != 'normal'):?> product][$story->branch])) echo $branchGroups[$story->product][$story->branch];?>