This commit is contained in:
wangyidong
2016-05-11 13:18:32 +08:00
parent 4d78e3c1dd
commit 0cabcabd54

View File

@@ -261,7 +261,7 @@ class testtaskModel extends model
*/
public function getRuns($taskID, $moduleID, $orderBy, $pager = null)
{
$orderBy = strpos($orderBy, 'assignedTo') !== false ? ('t1.' . $orderBy) : ('t2.' . $orderBy);
$orderBy = (strpos($orderBy, 'assignedTo') !== false or strpos($orderBy, 'lastRunResult') !== false) ? ('t1.' . $orderBy) : ('t2.' . $orderBy);
return $this->dao->select('t2.*,t1.*,t2.version as caseVersion,t3.title as storyTitle')->from(TABLE_TESTRUN)->alias('t1')
->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id')