* code for task#981.
This commit is contained in:
@@ -160,17 +160,10 @@ class testcaseModel extends model
|
||||
$case->storyStatus = $story->status;
|
||||
$case->latestStoryVersion = $story->version;
|
||||
}
|
||||
if($case->fromBug) $case->fromBugTitle = $this->dao->findById($case->fromBug)->from(TABLE_BUG)->fields('title')->fetch('title');
|
||||
|
||||
/* Get fromBugName and toBugs. */
|
||||
$case->fromBugName = '';
|
||||
$case->toBugs = array();
|
||||
|
||||
if($case->fromBug)
|
||||
{
|
||||
$bug = $this->dao->findById($case->fromBug)->from(TABLE_BUG)->fields('title')->fetch();
|
||||
$case->fromBugName = $bug->title;
|
||||
}
|
||||
$toBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('`case`')->eq($caseID)->fetchAll();
|
||||
$case->toBugs = array();
|
||||
$toBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('`case`')->eq($caseID)->fetchAll();
|
||||
foreach($toBugs as $toBug) $case->toBugs[$toBug->id] = $toBug->title;
|
||||
|
||||
if($case->linkCase) $case->linkCaseTitles = $this->dao->select('id,title')->from(TABLE_CASE)->where('id')->in($case->linkCase)->fetchPairs();
|
||||
|
||||
@@ -187,15 +187,15 @@
|
||||
<table class='table-1 a-left'>
|
||||
<tr>
|
||||
<td class='rowhead w-p20'><?php echo $lang->testcase->fromBug;?></td>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$case->fromBug"), $case->fromBugName);?></td>
|
||||
<td><?php echo html::a($this->createLink('bug', 'view', "bugID=$case->fromBug"), $case->fromBugTitle);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class='rowhead w-p20'><?php echo $lang->testcase->toBug;?></td>
|
||||
<td>
|
||||
<?php
|
||||
foreach($case->toBugs as $bugID => $bug)
|
||||
foreach($case->toBugs as $bugID => $bugTitle)
|
||||
{
|
||||
echo '<p style="margin-bottom:0;">' . html::a($this->createLink('bug', 'view', "bugID=$bugID"), $bug) . '</p>';
|
||||
echo '<p style="margin-bottom:0;">' . html::a($this->createLink('bug', 'view', "bugID=$bugID"), $bugTitle) . '</p>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user