diff --git a/module/task/control.php b/module/task/control.php index 6fc9247fb9..455a6e4a66 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -432,8 +432,25 @@ class task extends control $task = $this->task->getById($taskID, true); if(!$task) die(js::error($this->lang->notFound) . js::locate('back')); - $story = $this->story->getById($task->story); - $task->storySpec = ($story != null) ? $story->spec : ''; + if($task->fromBug != 0) + { + $bug = $this->loadModel('bug')->getById($task->fromBug); + if($bug) + { + $task->bugSteps = $bug->steps; + foreach($bug->files as $file) $task->files[] = $file; + } + } + else + { + $story = $this->story->getById($task->story); + if($story) + { + $task->storySpec = $story->spec; + $story->files = $this->loadModel('file')->getByObject('story', $task->story); + foreach($story->files as $file) $task->files[] = $file; + } + } /* Update action. */ if($task->assignedTo == $this->app->user->account) $this->loadModel('action')->read('task', $taskID); diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 564978a0c4..6497daa0eb 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -71,10 +71,17 @@