diff --git a/module/story/model.php b/module/story/model.php index 13db4d691a..fbb329d7a4 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1826,15 +1826,16 @@ class storyModel extends model if(strpos('draft,closed', $story->status) !== false) continue; $task = new stdclass(); - $task->execution = $executionID; - $task->project = $projectID; - $task->name = $story->title; - $task->story = $story->id; - $task->type = $data->type; - $task->estimate = isset($data->hourPointValue) ? ($story->estimate * $data->hourPointValue) : $story->estimate; - $task->left = $task->estimate; - $task->openedBy = $this->app->user->account; - $task->openedDate = $now; + $task->execution = $executionID; + $task->project = $projectID; + $task->name = $story->title; + $task->story = $story->id; + $task->type = $data->type; + $task->estimate = isset($data->hourPointValue) ? ($story->estimate * $data->hourPointValue) : $story->estimate; + $task->left = $task->estimate; + $task->openedBy = $this->app->user->account; + $task->openedDate = $now; + $task->storyVersion = $story->version; if(isset($data->fields)) { diff --git a/module/task/control.php b/module/task/control.php index 4102345afa..039d411881 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -199,7 +199,7 @@ class task extends control $moduleID = $this->tree->getStoryModule($task->module); $moduleIdList = $this->tree->getAllChildID($moduleID); } - $stories = $this->story->getExecutionStoryPairs($executionID, 0, 0, $moduleIdList, 'full', 'unclosed'); + $stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', $moduleIdList, 'full', 'unclosed'); /* Get block id of assinge to me. */ $blockID = 0;