From 34ec8c0a22e89bec140a7f7ec30751e24987353d Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 26 Aug 2022 16:47:22 +0800 Subject: [PATCH 1/2] * Fix bug#26779. --- module/story/control.php | 2 +- module/story/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 1fde5ca354..0d2b6cf323 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1878,7 +1878,7 @@ class story extends control $storyGroup = array(); foreach($stories as $story) { - if(strpos('draft,closed', $story->status) !== false) continue; + if(strpos('draft,reviewing,changing,closed', $story->status) !== false) continue; if(isset($storyGroup[$story->module])) continue; $storyGroup[$story->module] = $this->story->getExecutionStoryPairs($executionID, 0, 'all', $story->module, 'short', 'active'); } diff --git a/module/story/model.php b/module/story/model.php index c62e5af575..31d1203cba 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3010,7 +3010,7 @@ class storyModel extends model if($excludeStories) $storyQuery = $storyQuery . ' AND `id` NOT ' . helper::dbIN($excludeStories); if($this->app->moduleName == 'productplan') $storyQuery .= " AND `status` NOT IN ('closed') AND `parent` >= 0 "; $allBranch = "`branch` = 'all'"; - if($executionID != '') + if(!empty($executionID)) { $normalProducts = array(); $branchProducts = array(); From e00f756381ea52be2cab3bedcf12560173d6bf38 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Fri, 26 Aug 2022 16:47:57 +0800 Subject: [PATCH 2/2] * Fix bug#26779. --- api/v1/entries/productissue.php | 2 +- api/v1/entries/productissues.php | 2 +- api/v1/entries/reports.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/v1/entries/productissue.php b/api/v1/entries/productissue.php index 176a92ed7f..42e9b8ff28 100644 --- a/api/v1/entries/productissue.php +++ b/api/v1/entries/productissue.php @@ -34,7 +34,7 @@ class productIssueEntry extends entry { case 'story': $this->app->loadLang('story'); - $storyStatus = array('' => '', 'draft' => 'opened', 'active' => 'opened', 'changed' => 'opened', 'closed' => 'closed'); + $storyStatus = array('' => '', 'draft' => 'opened', 'reviewing' => 'opened', 'active' => 'opened', 'changing' => 'opened', 'closed' => 'closed'); $story = $this->dao->select('*')->from(TABLE_STORY)->where('id')->eq($id)->fetch(); if(!$story) $this->send404(); diff --git a/api/v1/entries/productissues.php b/api/v1/entries/productissues.php index 474a61c5c2..809e6ba0bf 100644 --- a/api/v1/entries/productissues.php +++ b/api/v1/entries/productissues.php @@ -30,7 +30,7 @@ class productIssuesEntry extends entry $storyFields = 'id,status'; $storyStatus = array('' => ''); - $storyStatus['opened'] = 'draft,active,changed'; + $storyStatus['opened'] = 'draft,reviewing,active,changing'; $storyStatus['closed'] = 'closed'; $bugFields = 'id,status'; diff --git a/api/v1/entries/reports.php b/api/v1/entries/reports.php index 4f7d14a273..fbd15ecaf7 100644 --- a/api/v1/entries/reports.php +++ b/api/v1/entries/reports.php @@ -273,7 +273,7 @@ class reportsEntry extends entry } /* Set story status statistics integrate into product. */ - $storyStatusList = array('draft' => array(), 'active' => array(), 'changed' => array(), 'closed' => array()); + $storyStatusList = array('draft' => array(), 'reviewing' => array(), 'active' => array(), 'changing' => array(), 'closed' => array()); foreach($processedProducts as $productID => $product) { $product->storyStat = array();