Convert toBugs of case to an array of objects.

This commit is contained in:
liumengyi
2023-06-01 10:54:04 +08:00
parent 945ab76bac
commit ce2d397cbc
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -497,8 +497,8 @@ class testcaseModel extends model
if($case->fromBug) $case->fromBugTitle = $this->dao->findById($case->fromBug)->from(TABLE_BUG)->fields('title')->fetch('title');
$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;
$toBugs = $this->dao->select('id, title, severity, openedDate')->from(TABLE_BUG)->where('`case`')->eq($caseID)->fetchAll();
foreach($toBugs as $toBug) $case->toBugs[$toBug->id] = $toBug;
if($case->linkCase or $case->fromCaseID) $case->linkCaseTitles = $this->dao->select('id,title')->from(TABLE_CASE)->where('id')->in($case->linkCase)->orWhere('id')->eq($case->fromCaseID)->fetchPairs();
if($version == 0) $version = $case->version;