From a23b2691aed81cefe274d5993339f9fdea821b4f Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 16 Dec 2023 10:01:03 +0800 Subject: [PATCH] * Fix bug #41672. --- module/execution/model.php | 2 ++ module/programplan/model.php | 10 ++++------ module/project/zen.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 59c3aa99ee..be1df8e9f5 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1672,6 +1672,8 @@ class executionModel extends model $executions[$execution->id]->title = implode('/', $parentExecutions); } } + + foreach($parentList as $parentID) unset($executions[$parentID]); return $executions; } diff --git a/module/programplan/model.php b/module/programplan/model.php index fde40f28fc..5b83e7c913 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -495,7 +495,7 @@ class programplanModel extends model $planIDList = $formData->get('planIDList'); $names = $formData->get('name'); $projectManager = $formData->get('PM'); - $percents = $formData->get('percent'); + $percent = $formData->get('percent'); $attributes = $formData->get('attribute'); $acl = $formData->get('acl'); $milestone = $formData->get('milestone'); @@ -506,7 +506,7 @@ class programplanModel extends model $desc = $formData->get('desc'); $orders = $formData->get('orders'); $type = $formData->get('type'); - $codes = $formData->get('code'); + $code = $formData->get('code'); $output = $formData->get('output'); /* Determine if a task has been created under the parent phase. */ @@ -550,10 +550,8 @@ class programplanModel extends model $plan->PM = empty($projectManager[$key]) ? '' : $projectManager[$key]; $plan->desc = empty($desc[$key]) ? '' : $desc[$key]; $plan->hasProduct = $project->hasProduct; - $plan->percent = 0; - $plan->code = ''; - if($setCode) $plan->code = $codes[$key]; - if($setPercent) $plan->percent = $percents[$key]; + if($setCode) $plan->code = empty($code[$key]) ? '' : $code[$key]; + if($setPercent) $plan->percent = empty($percent[$key]) ? 0 : $percent[$key]; $plan->begin = empty($begin[$key]) ? null : $begin[$key]; $plan->end = empty($end[$key]) ? null : $end[$key]; diff --git a/module/project/zen.php b/module/project/zen.php index 7013d95828..2df7be147c 100755 --- a/module/project/zen.php +++ b/module/project/zen.php @@ -1240,7 +1240,7 @@ class projectZen extends project $projectStories = $this->story->getExecutionStoryPairs($project->id); $project->storyCount = count($projectStories); - $executions = $this->execution->getStatData($project->id, 'all'); + $executions = $this->execution->getStatData($project->id, 'all', 0, 0, false, 'skipParent'); $project->executionCount = count($executions); $project->from = 'project';