From 3d64493a751f2d9054e702b379ef7b210e1af70a Mon Sep 17 00:00:00 2001 From: liuruogu Date: Wed, 21 Sep 2022 06:38:43 +0000 Subject: [PATCH 1/2] * Fix bug #27665 and hidden product menu. --- module/execution/model.php | 2 ++ module/story/control.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/module/execution/model.php b/module/execution/model.php index 2b1ed450fc..27cf2f9a4f 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -120,6 +120,8 @@ class executionModel extends model $this->cookie->executionMode = 'all'; } + if(empty($execution->hasProduct)) unset($this->lang->execution->menu->settings['subMenu']->products); + $this->lang->switcherMenu = $this->getSwitcher($executionID, $this->app->rawModule, $this->app->rawMethod); common::setMenuVars('execution', $executionID); } diff --git a/module/story/control.php b/module/story/control.php index 618a9933c9..d42efc4f5c 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -2229,6 +2229,7 @@ class story extends control $story = $this->story->getById($storyID); $products = $this->product->getPairs('', 0, '', true); $queryID = 0; + $product = $this->product->getByID($story->product); /* Change for requirement story title. */ if($story->type == 'story') @@ -2244,6 +2245,8 @@ class story extends control $this->lang->story->title = str_replace($this->lang->URCommon, $this->lang->SRCommon, $this->lang->story->title); } + if(!empty($product->shadow)) unset($this->config->product->search['fields']['product']); + /* Build search form. */ $actionURL = $this->createLink('story', 'linkStory', "storyID=$storyID&type=$type&linkedStoryID=$linkedStoryID&browseType=bySearch&queryID=myQueryID&storyType=$storyType", '', true); $this->product->buildSearchForm($story->product, $products, $queryID, $actionURL); From 6f470bba6f54df28bad432b07c38ade40abdcb27 Mon Sep 17 00:00:00 2001 From: liuruogu Date: Wed, 21 Sep 2022 07:34:28 +0000 Subject: [PATCH 2/2] * Fix bug #27646. --- module/story/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 2ceb48eb99..d2046cf814 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -56,7 +56,7 @@ if($this->app->rawModule == 'projectstory') { $otherParam = "storyID=&projectID={$this->session->project}"; - $openGroup = 'project'; + $tab = 'project'; } ?> product}&branch={$story->branch}&moduleID={$story->module}&$otherParam&bugID=0&planID=0&todoID=0&extra=&type=$story->type", " " . $lang->story->create, '', "class='btn btn-primary' data-app='$tab'"); ?>