* Finish task #4767.

This commit is contained in:
Yagami
2018-09-07 10:18:56 +08:00
parent f588b7fc27
commit cd3ab96967
2 changed files with 18 additions and 1 deletions
+11 -1
View File
@@ -395,7 +395,6 @@ class testtask extends control
$runs = $this->testtask->getRuns($taskID, 0, $groupBy);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
$runs = $this->testcase->appendData($runs, 'run');
$groupCases = array();
$groupByList = array();
foreach($runs as $run)
@@ -411,6 +410,17 @@ class testtask extends control
}
}
if($groupBy == 'story' && $task->build)
{
$buildStoryIDs = $this->dao->select('stories')->from(TABLE_BUILD)->where('id')->eq($task->build)->fetch('stories');
$buildStories = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($buildStoryIDs)->andWhere('id')->notin(array_keys($groupCases))->fetchAll('id');
foreach($buildStories as $buildStory)
{
$groupCases[$buildStory->id][] = $buildStory;
$groupByList[$buildStory->id] = $buildStory->title;
}
}
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testtask->cases;
$this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]);
$this->view->position[] = $this->lang->testtask->common;
+7
View File
@@ -55,6 +55,13 @@
<?php echo html::a('###', "<i class='icon-caret-down'></i> $groupName", '', "class='text-primary'");?>
</td>
<?php endif;?>
<?php
if(!isset($run->case))
{
echo "<td colspan='13'></td>";
continue;
}
?>
<td class='c-id-sm'><?php echo sprintf('%03d', $run->case);?></td>
<td><span class='label-pri <?php echo 'label-pri-' . $run->pri;?>' title='<?php echo zget($lang->testcase->priList, $run->pri, $run->pri);?>'><?php echo zget($lang->testcase->priList, $run->pri, $run->pri);?></span></td>
<td class='text-left'><?php if(!common::printLink('testcase', 'view', "case=$run->case", $run->title)) echo $run->title;?></td>