From 6bb77b4346c4b6f4f623554fdf549984985e7a3f Mon Sep 17 00:00:00 2001 From: sunguangming Date: Mon, 18 Mar 2024 16:54:41 +0800 Subject: [PATCH] * Code for task #113252. --- module/product/config/search.php | 2 ++ module/product/zen.php | 3 +++ module/story/tao.php | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/module/product/config/search.php b/module/product/config/search.php index ba7073da78..9985a77588 100644 --- a/module/product/config/search.php +++ b/module/product/config/search.php @@ -12,6 +12,7 @@ $config->product->search['fields']['module'] = $lang->story->module; $config->product->search['fields']['stage'] = $lang->story->stage; $config->product->search['fields']['product'] = $lang->story->product; $config->product->search['fields']['branch'] = ''; +$config->product->search['fields']['grade'] = $lang->story->grade; $config->product->search['fields']['plan'] = $lang->story->plan; $config->product->search['fields']['estimate'] = $lang->story->estimate; @@ -47,6 +48,7 @@ $config->product->search['params']['pri'] = array('operator' => '=', $config->product->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => ''); $config->product->search['params']['branch'] = array('operator' => '=', 'control' => 'select', 'values' => ''); +$config->product->search['params']['grade'] = array('operator' => '=', 'control' => 'select', 'values' => ''); $config->product->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => ''); $config->product->search['params']['plan'] = array('operator' => '=', 'control' => 'select', 'values' => ''); $config->product->search['params']['estimate'] = array('operator' => '=', 'control' => 'input', 'values' => ''); diff --git a/module/product/zen.php b/module/product/zen.php index 9dc85c39fc..e6dd47e081 100644 --- a/module/product/zen.php +++ b/module/product/zen.php @@ -1194,6 +1194,9 @@ class productZen extends product } } + $gradePairs = $this->loadModel('story')->getGradePairs($storyType, 'grade', 'name', 'all'); + $this->config->product->search['params']['grade']['values'] = $gradePairs; + /* Build search form. */ $params = $isProjectStory ? "projectID=$projectID&" : ''; $actionURL = $this->createLink($this->app->rawModule, $this->app->rawMethod, $params . "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType"); diff --git a/module/story/tao.php b/module/story/tao.php index 6ec1314598..353092da4d 100644 --- a/module/story/tao.php +++ b/module/story/tao.php @@ -611,7 +611,9 @@ class storyTao extends storyModel */ protected function getUnclosedStatusKeys(): array { - $moduleName = $this->app->rawModule; + $moduleName = $this->app->rawModule; + if(!in_array($moduleName, array('story', 'epic', 'requirement'))) $moduleName = 'story'; + $unclosedStatus = $this->lang->{$moduleName}->statusList; unset($unclosedStatus['closed']); return array_keys($unclosedStatus);