* Adjust code.
This commit is contained in:
@@ -768,26 +768,6 @@ class productModel extends model
|
||||
return $stories;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the total number of requirements associated with the product.
|
||||
*
|
||||
* @param array $productIdList
|
||||
* @param string $type
|
||||
* @param string $status closed|active|draft
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getTotalStoriesByProduct($productIdList, $type, $status = '')
|
||||
{
|
||||
return $this->dao->select("count(*) as stories")->from(TABLE_STORY)
|
||||
->where('type')->eq($type)
|
||||
->andWhere('product')->in($productIdList)
|
||||
->beginIF($status != '')->andWhere('status')->eq($status)
|
||||
->beginIF($status == 'closed')->andWhere('closedReason')->eq('done')->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetch('stories');
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch get story stage.
|
||||
*
|
||||
|
||||
@@ -330,7 +330,8 @@ class projectModel extends model
|
||||
->where('t1.project')->eq($projectID)
|
||||
->andWhere('t2.type')->eq($type)
|
||||
->andWhere('t2.product')->in($productIdList)
|
||||
->beginIF($status != 'all')->andWhere('t2.status')->eq($status)->fi()
|
||||
->beginIF($status == 'active')->andWhere('t2.status')->in('active,changed')->fi()
|
||||
->beginIF($status == 'closed')->andWhere('t2.status')->eq('closed')->fi()
|
||||
->beginIF($status == 'closed')->andWhere('t2.closedReason')->eq('done')->fi()
|
||||
->andWhere('deleted')->eq('0')
|
||||
->fetch('stories');
|
||||
|
||||
Reference in New Issue
Block a user