+ add my testtask.

This commit is contained in:
wangchunsheng
2010-11-29 14:57:55 +00:00
parent 363bf93f4a
commit a6a7cd0e61
11 changed files with 140 additions and 23 deletions
+19
View File
@@ -88,6 +88,25 @@ class testtaskModel extends model
->where('t1.id')->eq((int)$taskID)->fetch();
}
/**
* Get test tasks by user.
*
* @param string $account
* @access public
* @return array
*/
public function getByUser($account)
{
return $this->dao->select('t1.*, t2.name AS projectName, t3.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
->andWhere('t1.deleted')->eq(0)
->andWhere('t1.owner')->eq($account)
->orderBy('id desc')
->fetchAll();
}
/**
* Update a test task.
*