From c05b94e3b0e0c409a38dfcde32f413fdf4c086ab Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 7 Nov 2022 16:00:47 +0800 Subject: [PATCH 1/2] * Fix bug #29377. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index 1d4df4b1aa..958a282827 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -575,7 +575,7 @@ class actionModel extends model if($history->field == 'git') $history->diff = str_replace('+', '%2B', $history->diff); } } - elseif(strpos('linkstory,unlinkstory,createchildrenstory', $actionName) !== false) + elseif(strpos(',linkstory,unlinkstory,createchildrenstory,', ",$actionName,") !== false) { $extra = ''; foreach(explode(',', $action->extra) as $id) $extra .= common::hasPriv('story', 'view') ? html::a(helper::createLink('story', 'view', "storyID=$id"), "#$id ") . ', ' : "#$id, "; From e1ca6e57aa153115fb8f4180945d92ab1378ad56 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 7 Nov 2022 17:21:08 +0800 Subject: [PATCH 2/2] * Fix bug #29361. --- module/design/control.php | 2 +- module/design/js/common.js | 3 ++- module/story/control.php | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/design/control.php b/module/design/control.php index 728eb2b4d6..1fd623eaed 100644 --- a/module/design/control.php +++ b/module/design/control.php @@ -162,7 +162,7 @@ class design extends control $this->view->position[] = $this->lang->design->create; $this->view->users = $this->loadModel('user')->getPairs('noclosed'); - $this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID); + $this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID, 'all', 0, 'active'); $this->view->productID = $productID; $this->view->type = $type; $this->view->project = $this->loadModel('project')->getByID($projectID); diff --git a/module/design/js/common.js b/module/design/js/common.js index 228284b775..7fbbb1f978 100644 --- a/module/design/js/common.js +++ b/module/design/js/common.js @@ -6,11 +6,12 @@ $(document).on('click', '.ajaxPager', function() $('#product').change(function() { productID = $(this).val(); - var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID); + var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=all&moduleID=0&storyID=0&onlyOption=false&status=active'); $.post(link, function(data) { $('#story').replaceWith(data); $('#story_chosen').remove(); + $('#story').next('.picker').remove(); $('#story').chosen(); }) }) diff --git a/module/story/control.php b/module/story/control.php index 105528bd04..20295bcd52 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -2372,6 +2372,8 @@ class story extends control $storyStatus = array_keys($storyStatus); } + if($status == 'active') $storyStatus = $status; + if($executionID) { $stories = $this->story->getExecutionStoryPairs($executionID, $productID, $branch, $moduleID, $type);