diff --git a/module/execution/control.php b/module/execution/control.php index 9881cf4be7..543ce89f45 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3178,6 +3178,9 @@ class execution extends control $this->loadModel('product'); $execution = $this->execution->getById($executionID); + $project = $this->loadModel('project')->getByID($execution->project); + if(!$project->hasProduct) return print(js::error($this->lang->project->cannotManageProducts) . js::locate('back')); + if($project->model == 'waterfall' or $project->model == 'waterfallplus') return print(js::error(sprintf($this->lang->execution->cannotManageProducts, zget($this->lang->project->modelList, $project->model))) . js::locate('back')); if(!empty($_POST)) { diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index aacc1a5dba..a80973707d 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -429,6 +429,7 @@ $lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s $lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; $lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; $lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; +$lang->execution->cannotManageProducts = 'The ' . strtolower($lang->project->common). ' model of this ' . strtolower($lang->execution->common) . " is %s and this " . strtolower($lang->execution->common) . ' cannot be associated with products.'; /* Statistics. */ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index d8f522124d..a85838dffd 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -429,6 +429,7 @@ $lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s $lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; $lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; $lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; +$lang->execution->cannotManageProducts = 'The ' . strtolower($lang->project->common). ' model of this ' . strtolower($lang->execution->common) . " is %s and this " . strtolower($lang->execution->common) . ' cannot be associated with products.'; /* Statistics. */ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 46f9661aa7..e5ca0aa203 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -429,6 +429,7 @@ $lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s $lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; $lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; $lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; +$lang->execution->cannotManageProducts = 'The ' . strtolower($lang->project->common). ' model of this ' . strtolower($lang->execution->common) . " is %s and this " . strtolower($lang->execution->common) . ' cannot be associated with products.'; /* Statistics. */ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 211e47444a..8fcbcc036f 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -429,6 +429,7 @@ $lang->execution->hasStartedTaskOrSubStage = "%s%s下的任务或子阶段 $lang->execution->hasSuspendedOrClosedChildren = "阶段%s下的子阶段未全部挂起或关闭,无法修改,已过滤。"; $lang->execution->hasNotClosedChildren = "阶段%s下的子阶段未全部关闭,无法修改,已过滤。"; $lang->execution->hasStartedTask = "%s%s下的任务已经开始,无法修改,已过滤。"; +$lang->execution->cannotManageProducts = "当前{$lang->execution->common}的{$lang->project->common}为%s{$lang->project->common},不能关联产品。"; /* 统计。*/ $lang->execution->charts = new stdclass();