* Finish task#860.

This commit is contained in:
chencongzhi520@gmail.com
2012-06-15 02:14:39 +00:00
parent 15b1ef2f5d
commit 2bfe07e3a0
11 changed files with 268 additions and 157 deletions
-19
View File
@@ -1050,23 +1050,4 @@ class projectModel extends model
->page($pager)
->fetchAll();
}
/**
* Get resolved bugs of a project
*
* @param int $projectID
* @access public
* @return array
*/
public function getResolvedBugs($projectID)
{
$project = $this->getById($projectID);
$products = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($projectID)->fetchPairs('product');
return $this->dao->select('id, title, status')->from(TABLE_BUG)
->where('status')->eq('resolved')
->andWhere('resolvedDate')->ge($project->begin)
->andWhere('resolution')->eq('fixed')
->andWhere('product')->in($products)
->fetchAll();
}
}