From 783d4471b08f0dcf2402d94a350994667623cd4d Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 16 Jun 2022 15:50:25 +0800 Subject: [PATCH] * Fix bug#23797. --- module/execution/control.php | 1 + module/story/model.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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')