+ finish the task #628.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-11-29 01:54:35 +00:00
parent 5b5365e243
commit 13e8d56048
6 changed files with 135 additions and 0 deletions
+21
View File
@@ -71,6 +71,27 @@ class testtaskModel extends model
->fetchAll();
}
/**
* Get test tasks of a project.
*
* @param int $projectID
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getProjectTasks($projectID, $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('t1.*, t2.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = t2.id')
->where('t1.project')->eq((int)$projectID)
->andWhere('t1.deleted')->eq(0)
->orderBy($orderBy)
->page($pager)
->fetchAll();
}
/**
* Get test task info by id.
*