* Fix bug#3757.
This commit is contained in:
@@ -741,12 +741,12 @@ class productModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTotalStoriesByProduct($productIdList, $type, $status)
|
||||
public function getTotalStoriesByProduct($productIdList, $type, $status = '')
|
||||
{
|
||||
return $this->dao->select("count(*) as stories")->from(TABLE_STORY)
|
||||
->where('type')->eq($type)
|
||||
->andWhere('product')->in($productIdList)
|
||||
->andWhere('status')->eq($status)
|
||||
->beginIF($status != '')->andWhere('status')->eq($status)
|
||||
->beginIF($status == 'closed')->andWhere('closedReason')->eq('done')->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetch('stories');
|
||||
|
||||
@@ -926,7 +926,7 @@ class programModel extends model
|
||||
foreach($projectIdList as $projectID)
|
||||
{
|
||||
$productIdList = $this->loadModel('product')->getProductIDByProject($projectID);
|
||||
$allStories[$projectID] = $this->product->getTotalStoriesByProduct($productIdList, 'story', 'draft');
|
||||
$allStories[$projectID] = $this->product->getTotalStoriesByProduct($productIdList, 'story');
|
||||
$doneStories[$projectID] = $this->product->getTotalStoriesByProduct($productIdList, 'story', 'closed');
|
||||
$leftStories[$projectID] = $this->product->getTotalStoriesByProduct($productIdList, 'story', 'active');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user