From cb13492e95ae35f4e3425a8bebd2cd26006d1474 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Fri, 19 May 2023 05:20:32 +0000 Subject: [PATCH] * Fix bug #35262. --- module/execution/control.php | 2 +- module/execution/model.php | 4 ++-- module/programplan/model.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 1561799981..98ae035b79 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2489,7 +2489,7 @@ class execution extends control if(dao::isError()) return print(js::error(dao::getError())); $project = $this->loadModel('project')->getById($execution->project); - if($project->model == 'waterfall' or $project->model == 'waterfallplus') $this->loadModel('programplan')->computeProgress($executionID, 'close'); + if(in_array($project->model, array('waterfall', 'waterfallplus', 'ipd'))) $this->loadModel('programplan')->computeProgress($executionID, 'close'); $this->executeHooks($executionID); if(isonlybody() and $from == 'kanban') diff --git a/module/execution/model.php b/module/execution/model.php index ac8f78512b..601ca42c19 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -5305,7 +5305,7 @@ class executionModel extends model $title = ''; $disabled = ''; - if($project and $project->model == 'ipd') + if($project and $project->model == 'ipd' and !$isChild) { $this->app->loadLang('stage'); $title = $execution->ipdStage['canStart'] ? '' : sprintf($this->lang->execution->disabledTip->startTip, $this->lang->stage->ipdTypeList[$execution->ipdStage['preAttribute']], $this->lang->stage->ipdTypeList[$execution->attribute]); @@ -5340,7 +5340,7 @@ class executionModel extends model { $ipdDisabled = ''; $title = $this->lang->execution->close; - if(isset($execution->ipdStage['canClose']) and !$execution->ipdStage['canClose']) + if(isset($execution->ipdStage['canClose']) and !$execution->ipdStage['canClose'] and !$isChild) { $ipdDisabled = ' disabled '; $title = $execution->attribute == 'launch' ? $this->lang->execution->disabledTip->launchTip : $this->lang->execution->disabledTip->closeTip; diff --git a/module/programplan/model.php b/module/programplan/model.php index 77d7ca0fba..ef4d7defe6 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -434,7 +434,7 @@ class programplanModel extends model $data->parent = $plan->id; $data->open = true; $data->start_date = $end; - $data->endDate = $end; + $data->endDate = $end; $data->duration = 1; $data->color = isset($this->lang->programplan->reviewColorList[$point->status]) ? $this->lang->programplan->reviewColorList[$point->status] : '#FC913F'; $data->progressColor = $this->lang->execution->gantt->stage->progressColor; @@ -1618,7 +1618,7 @@ class programplanModel extends model { $stage = $this->loadModel('execution')->getByID($stageID); $project = $this->loadModel('project')->getByID($stage->project); - if(empty($stage) or empty($stage->path) or ($project->model != 'waterfall' and $project->model != 'waterfallplus')) return false; + if(empty($stage) or empty($stage->path) or (!in_array($project->model, array('waterfall','waterfallplus','ipd')))) return false; $this->loadModel('execution'); $this->loadModel('action');