From bacc08fcfacb5b138c50ab67da3cff04084acfa7 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Tue, 23 Jan 2024 10:51:45 +0800 Subject: [PATCH] * Fix bug #44728. --- module/execution/ui/testcase.html.php | 1 + module/testcase/ui/browse.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/execution/ui/testcase.html.php b/module/execution/ui/testcase.html.php index c2ff92c5d8..0f3c4784db 100644 --- a/module/execution/ui/testcase.html.php +++ b/module/execution/ui/testcase.html.php @@ -41,6 +41,7 @@ if(isset($config->testcase->dtable->fieldList['story'])) $config->testcase->dta if(isset($config->testcase->dtable->fieldList['scene'])) $config->testcase->dtable->fieldList['scene']['map'] = $scenes; $config->testcase->dtable->fieldList['actions']['list']['edit']['url'] = str_replace('%executionID%', (string)$executionID, $config->testcase->dtable->fieldList['actions']['list']['edit']['url']); $config->testcase->dtable->fieldList['actions']['menu'] = array(array('confirmStoryChange'), array('runCase', 'runResult', 'edit', 'createBug', 'create')); +if($config->testcase->needReview) array_unshift($config->testcase->dtable->fieldList['actions']['menu'][1], 'review'); $this->config->testcase->dtable->fieldList['title']['link'] = array('module' => 'testcase', 'method' => 'view', 'params' => "caseID={id}"); foreach($config->testcase->dtable->fieldList['actions']['list'] as $method => $action) { diff --git a/module/testcase/ui/browse.html.php b/module/testcase/ui/browse.html.php index 9b9bca5387..feec665dbb 100644 --- a/module/testcase/ui/browse.html.php +++ b/module/testcase/ui/browse.html.php @@ -114,7 +114,7 @@ foreach($cases as $case) $actionType = $case->isScene ? 'scene' : 'testcase'; $cols['actions']['menu'] = $config->$actionType->menu; - if($actionType == 'testcase' && $this->config->testcase->needReview) unset($cols['actions']['menu'][1][0]); + if($actionType == 'testcase' && !$this->config->testcase->needReview) unset($cols['actions']['menu'][1][0]); $case->browseType = $browseType; initTableData(array($case), $cols, $this->testcase);