* finish task #2290.

This commit is contained in:
wangyidong
2015-09-01 17:04:56 +08:00
parent 8274afc8da
commit 6ca4dc0197
2 changed files with 26 additions and 2 deletions
+19 -2
View File
@@ -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);