From b924688fe8d3fedd26d66f25f0d368b8c882db6a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 9 Mar 2023 10:20:20 +0800 Subject: [PATCH] * Fix bug #32711. --- module/execution/model.php | 8 +++++++- module/execution/view/create.html.php | 2 +- module/execution/view/view.html.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 2b0bab014f..53d16f4f74 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -59,7 +59,7 @@ class executionModel extends model */ public function getExecutionFeatures($execution) { - $features = array('story' => true, 'task' => true, 'qa' => true, 'devops' => true, 'burn' => true, 'build' => true, 'other' => true); + $features = array('story' => true, 'task' => true, 'qa' => true, 'devops' => true, 'burn' => true, 'build' => true, 'other' => true, 'plan' => true); /* Unset story, bug, build and testtask if type is ops. */ if($execution->lifetime == 'ops') @@ -81,10 +81,16 @@ class executionModel extends model if(in_array($execution->attribute, array('request', 'review'))) { $features['story'] = false; + $features['plan'] = false; } } } + if(isset($execution->projectInfo) and in_array($execution->projectInfo->model, array('waterfall', 'kanban', 'waterfallplus')) and empty($execution->projectInfo->hasProduct)) + { + $features['plan'] = false; + } + return $features; } diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 4db3b363ef..6e9c1acd9a 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -190,7 +190,7 @@ - hasProduct) and strpos($project->model, 'waterfall') === false):?> + hasProduct) and !in_array($project->model, array('waterfall', 'kanban', 'waterfallplus'))):?> execution->linkPlan;?> diff --git a/module/execution/view/view.html.php b/module/execution/view/view.html.php index a680f2da7d..ab8c80b5f7 100644 --- a/module/execution/view/view.html.php +++ b/module/execution/view/view.html.php @@ -345,7 +345,7 @@ - projectInfo->model, 'waterfall') !== false and (empty($execution->projectInfo->hasProduct) or in_array($execution->attribute, array('request', 'review'))))):?> +
execution->linkPlan;?>