diff --git a/module/execution/control.php b/module/execution/control.php index bb72b95d4d..197e86fc70 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -740,6 +740,7 @@ class execution extends control else { $this->session->set('executionStoryBrowseType', $type); + $this->session->set('storyBrowseType', $type, 'execution'); } /* Save session. */ diff --git a/module/story/model.php b/module/story/model.php index 1df659b653..4dbd940f30 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -2902,7 +2902,7 @@ class storyModel extends model $storyIdList = $this->dao->select('story')->from(TABLE_PROJECTSTORY)->where('project')->in(array_keys($executions))->fetchPairs(); } - $type = ($type == 'bymodule' and $this->session->storyBrowseType) ? $this->session->storyBrowseType : $type; + $type = (strpos('bymodule|byproduct', $type) !== false and $this->session->storyBrowseType) ? $this->session->storyBrowseType : $type; $stories = $this->dao->select('distinct t1.*, t2.*,t3.type as productType,t2.version as version')->from(TABLE_PROJECTSTORY)->alias('t1') ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')