* finish task #2681.

This commit is contained in:
chenfeiCF
2016-11-15 09:50:38 +08:00
parent c380ee7f81
commit 5e25d0396b
4 changed files with 19 additions and 0 deletions
+1
View File
@@ -31,6 +31,7 @@ $lang->task->activate = "Activate";
$lang->task->export = "Export Data";
$lang->task->reportChart = "Report Chart";
$lang->task->fromBug = 'From Bug';
$lang->task->case = 'Related Case';
$lang->task->confirmStoryChange = "Confirm Story Change";
$lang->task->common = 'Task';
+1
View File
@@ -31,6 +31,7 @@ $lang->task->activate = "激活";
$lang->task->export = "导出数据";
$lang->task->reportChart = "报表统计";
$lang->task->fromBug = '来源Bug';
$lang->task->case = '相关用例';
$lang->task->confirmStoryChange = "确认需求变动";
$lang->task->common = '任务';
+5
View File
@@ -804,6 +804,11 @@ class taskModel extends model
if($task->assignedTo == 'closed') $task->assignedToRealName = 'Closed';
foreach($task as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $task->$key = '';
$task->files = $this->loadModel('file')->getByObject('task', $taskID);
/* Get related test cases. */
$cases = $this->dao->select('id, title')->from(TABLE_CASE)->where('story')->eq($task->story)->andWhere('storyVersion')->eq($task->storyVersion)->fetchPairs();
if($cases) $task->cases = $cases;
return $this->processTask($task);
}
+12
View File
@@ -161,6 +161,18 @@
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$task->fromBug"), "#$task->fromBug " . $fromBug->title, '_blank');?></td>
</tr>
<?php endif;?>
<?php if(isset($task->cases)):?>
<tr>
<th><?php echo $lang->task->case;?></th>
<td>
<ul class='list-unstyled'>
<?php
foreach($task->cases as $caseID => $case) echo '<li>' . html::a($this->createLink('testcase', 'view', "caseID=$caseID"), "#$caseID " . $case, '_blank') . '</li>';
?>
</ul>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->task->assignedTo;?></th>
<td><?php echo $task->assignedTo ? $task->assignedToRealName . $lang->at . $task->assignedDate : '';?></td>