diff --git a/module/product/control.php b/module/product/control.php index dbd7ff3d1c..eecb1fc2a4 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -212,7 +212,6 @@ class product extends control $product = $this->product->getById($productID); /* Get stories. */ - $stories = $this->product->getStories($productID, $branch, $browseType, $queryID, $moduleID, $storyType, $sort, $pager); if($this->app->rawModule == 'projectstory') { if(!empty($product)) $this->session->set('currentProductType', $product->type); @@ -222,6 +221,10 @@ class product extends control if($browseType == 'bybranch') $param = $branch; $stories = $this->story->getExecutionStories($this->session->PRJ, $productID, $branch, $sort, $browseType, $param, 'story', '', $pager); } + else + { + $stories = $this->product->getStories($productID, $branch, $browseType, $queryID, $moduleID, $storyType, $sort, $pager); + } /* Process the sql, get the conditon partion, save it to session. */ $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', $browseType != 'bysearch' && $this->app->rawModule != 'projectstory');