From c152d918d487f8d58337ceb7a26b8af0158e7b9f Mon Sep 17 00:00:00 2001 From: wangyuting Date: Wed, 24 Jan 2024 11:13:45 +0800 Subject: [PATCH] * Fix project testcase page menu active error. bug #44781. --- module/testcase/model.php | 3 +++ module/testcase/ui/header.html.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index f115f05250..5b2ae54162 100755 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -1862,6 +1862,8 @@ class testcaseModel extends model */ public function getSceneGroupCases(int $productID, string $branch, array $modules, string $caseType, string $orderBy): array { + $browseType = $this->session->caseBrowseType && $this->session->caseBrowseType != 'bysearch' ? $this->session->caseBrowseType : 'all'; + $stmt = $this->dao->select('t1.*')->from(TABLE_CASE)->alias('t1'); if($this->app->tab == 'project') $stmt = $stmt->leftJoin(TABLE_PROJECTCASE)->alias('t2')->on('t1.id=t2.case'); @@ -1871,6 +1873,7 @@ class testcaseModel extends model ->beginIF($this->app->tab == 'project')->andWhere('t2.project')->eq($this->session->project)->fi() ->beginIF($branch !== 'all')->andWhere('t1.branch')->eq($branch)->fi() ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() + ->beginIF($browseType == 'wait')->andWhere('t1.status')->eq($browseType)->fi() ->beginIF($this->cookie->onlyAutoCase)->andWhere('t1.auto')->eq('auto')->fi() ->beginIF(!$this->cookie->onlyAutoCase)->andWhere('t1.auto')->ne('unit')->fi() ->beginIF($caseType)->andWhere('t1.type')->eq($caseType)->fi() diff --git a/module/testcase/ui/header.html.php b/module/testcase/ui/header.html.php index 41cb350f8e..4c61a7a85f 100644 --- a/module/testcase/ui/header.html.php +++ b/module/testcase/ui/header.html.php @@ -107,7 +107,7 @@ featureBar ( set::linkParams($rawMethod == 'zerocase' || $rawMethod == 'browseunits' ? null : $linkParams), set::link($rawMethod == 'zerocase' || $rawMethod == 'browseunits' ? $browseLink : null), - set::current($rawMethod == 'browse' ? $this->session->caseBrowseType : null), + set::current($methodName == 'browse' ? $this->session->caseBrowseType : null), set::load($load), set::app($app->tab), $canSwitchCaseType ? to::leading