* Fix bug#3757.

This commit is contained in:
qiyu-xie
2020-12-14 13:19:45 +08:00
parent d6e26536a6
commit 64fc9f5c84
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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');
+1 -1
View File
@@ -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');
}