* code for task#981.

This commit is contained in:
zhujinyong
2012-12-12 01:37:26 +00:00
parent 1bb978909d
commit bbe7892dbc
2 changed files with 6 additions and 13 deletions
+3 -10
View File
@@ -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();