diff --git a/module/story/model.php b/module/story/model.php index 01503fc0dc..cad7e9187c 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1311,7 +1311,7 @@ class storyModel extends model public function getProjectStories($projectID = 0, $orderBy = 'pri_asc,id_desc', $type = 'byModule', $param = 0, $pager = null) { $modules = ($type == 'byModule' and $param) ? $this->dao->select('*')->from(TABLE_MODULE)->where('path')->like("%,$param,%")->andWhere('type')->eq('story')->fetchPairs('id', 'id') : array(); - $stories = $this->dao->select('t1.*, t2.*,t3.branch as productBranch,t4.type as productType')->from(TABLE_PROJECTSTORY)->alias('t1') + $stories = $this->dao->select('t1.*, t2.*,t3.branch as productBranch,t4.type as productType, t2.version as version')->from(TABLE_PROJECTSTORY)->alias('t1') ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') ->leftJoin(TABLE_PROJECTPRODUCT)->alias('t3')->on('t1.project = t3.project') ->leftJoin(TABLE_PRODUCT)->alias('t4')->on('t2.product = t4.id')