* 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);
+7
View File
@@ -71,10 +71,17 @@
<legend><?php echo $lang->task->legendDesc;?></legend>
<div class='article-content'><?php echo $task->desc;?></div>
</fieldset>
<?php if($task->fromBug != 0):?>
<fieldset>
<legend><?php echo $lang->bug->steps;?></legend>
<div class='article-content'><?php echo $task->bugSteps;?></div>
</fieldset>
<?php else:?>
<fieldset>
<legend><?php echo $lang->task->storySpec;?></legend>
<div class='article-content'><?php echo $task->storySpec;?></div>
</fieldset>
<?php endif;?>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?>
<?php include '../../common/view/action.html.php';?>
<div class='actions'> <?php if(!$task->deleted) echo $actionLinks;?></div>