diff --git a/module/execution/control.php b/module/execution/control.php index 65674748d6..3a08565bd6 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1216,7 +1216,8 @@ class execution extends control $this->app->loadLang('programplan'); if($executionID) { - if(!empty($planID)) + $execution = $this->execution->getById($executionID); + if(!empty($planID) and $execution->lifetime != 'ops') { if($confirm == 'yes') { @@ -1224,7 +1225,7 @@ class execution extends control } else { - die(js::confirm($this->lang->execution->importPlanStory, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"), 'parent', 'parent')); + die(js::confirm($this->lang->execution->importPlanStory, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID"))); } } $this->view->title = $this->lang->execution->tips; diff --git a/module/execution/model.php b/module/execution/model.php index 2a6c1b79de..80200ad880 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2080,9 +2080,11 @@ class executionModel extends model } } } + + $projectID = $this->session->project; $this->linkStory($executionID, $planStories, $planProducts); - $this->linkStory($this->session->project, $planStories, $planProducts); - if($count != 0) echo js::alert(sprintf($this->lang->execution->haveDraft, $count)) . js::locate(helper::createLink('execution', 'create', "productID=&executionID=$executionID")); + $this->linkStory($projectID, $planStories, $planProducts); + if($count != 0) echo js::alert(sprintf($this->lang->execution->haveDraft, $count)) . js::locate(helper::createLink('execution', 'create', "projectID=$projectID&executionID=$executionID")); } /** diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 3488b3a143..8ce5187e40 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -12,7 +12,7 @@ ?> systemMode == 'new' ? $this->createLink('project', 'execution', "status=all&projectID=$projectID") : $this->createLink('execution', 'task', 'executionID=' . $executionID);?> - +
execution->afterInfo;?>