* add postponed bug when task import bug

This commit is contained in:
chujilu
2014-08-13 21:49:39 +08:00
parent 9ccf0237c9
commit 05081f19ba
3 changed files with 26 additions and 3 deletions
+23
View File
@@ -238,6 +238,29 @@ class bugModel extends model
->fetchAll();
}
/**
* get Active And Postponed Bugs
*
* @param int $products
* @param int $projectID
* @param int $pager
* @access public
* @return void
*/
public function getActiveAndPostponedBugs($products, $projectID, $pager = null)
{
return $this->dao->select('*')->from(TABLE_BUG)
->where("((status = 'resolved' AND resolution = 'postponed') OR (status = 'active'))")
->andWhere('toTask')->eq(0)
->andWhere('toStory')->eq(0)
->beginIF(!empty($products))->andWhere('product')->in($products)->fi()
->beginIF(empty($products))->andWhere('project')->eq($projectID)->fi()
->andWhere('deleted')->eq(0)
->orderBy('id desc')
->page($pager)
->fetchAll();
}
/**
* Update a bug.
*