diff --git a/module/execution/control.php b/module/execution/control.php index cb23a61043..a5c1ea8ee5 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -626,7 +626,7 @@ class execution extends control /* Build the search form. */ $actionURL = $this->createLink('execution', 'testcase', "executionID=$executionID&productID=$productID&branchID=$branchID&type=bysearch&queryID=myQueryID&moduleID=0&orderBy=$orderBy"); - $this->execution->buildCaseSearchForm($products, $param, $actionURL); + $this->execution->buildCaseSearchForm($products, $param, $actionURL, $executionID); $this->executionZen->assignTestcaseVars($executionID, $productID, $branchID, $moduleID, $orderBy, $type, $pager); diff --git a/module/execution/model.php b/module/execution/model.php index 7f68ea9ded..a4e1afd256 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4004,10 +4004,11 @@ class executionModel extends model * @param array $products * @param int $queryID * @param string $actionURL + * @param int $executionID * @access public * @return void */ - public function buildCaseSearchForm(array $products, int $queryID, string $actionURL) + public function buildCaseSearchForm(array $products, int $queryID, string $actionURL, int $executionID) { $modules = array(); foreach($products as $product) @@ -4066,6 +4067,7 @@ class executionModel extends model $this->config->testcase->search['params']['branch']['values'] = $branchPairs; } $this->config->testcase->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->testcase->statusList); + $this->config->testcase->search['params']['story']['values'] = $this->loadModel('story')->getExecutionStoryPairs($executionID); $this->loadModel('search')->setSearchParams($this->config->testcase->search); } diff --git a/module/testcase/zen.php b/module/testcase/zen.php index 868063c451..cede79a299 100755 --- a/module/testcase/zen.php +++ b/module/testcase/zen.php @@ -2421,12 +2421,14 @@ class testcaseZen extends testcase if($this->app->tab == 'project' && !$productID) { $productList = $products; + $this->config->testcase->search['params']['story']['values'] = $this->loadModel('story')->getExecutionStoryPairs($projectID, 0, 'all', $moduleID, 'full', 'active'); } else { $productList = array(); $productList['all'] = $this->lang->all; if(isset($products[$productID])) $productList[$productID] = $products[$productID]; + $this->config->testcase->search['params']['story']['values'] = $this->loadModel('story')->getProductStoryPairs($productID, $branch); } /* 获取模块列表。*/