diff --git a/module/story/tao.php b/module/story/tao.php index bd726ba65e..b26b1d79cf 100644 --- a/module/story/tao.php +++ b/module/story/tao.php @@ -536,7 +536,8 @@ class storyTao extends storyModel $browseType = $this->session->executionStoryBrowseType; $unclosedStatus = $this->getUnclosedStatusKeys(); return $storyDAO->beginIF(!empty($productID))->andWhere('t1.product')->eq($productID)->fi() - ->beginIF($browseType and strpos('changing|', $browseType) !== false)->andWhere('t2.status')->in($unclosedStatus)->fi() + ->beginIF(strpos('draft|reviewing|changing|closed', $browseType) !== false)->andWhere('t2.status')->eq($browseType)->fi() + ->beginIF($browseType == 'unclosed')->andWhere('t2.status')->in($unclosedStatus)->fi() ->orderBy($orderBy) ->page($pager, 't2.id') ->fetchAll('id');