From a5a0848a1cffff5fc9bc8c41b551266a178bfaee Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Tue, 28 Dec 2021 09:56:21 +0800 Subject: [PATCH] *Fix classic mode branch bug. --- module/testcase/control.php | 2 +- module/tree/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index ec203ea43d..983ec22947 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -491,7 +491,7 @@ class testcase extends control $this->view->executionID = $executionID; $this->view->productInfo = $productInfo; $this->view->productName = $this->products[$productID]; - $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch === 'all' ? 0 : $branch); + $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, ($branch === 'all' or !in_array($branch, array_keys($branches))) ? 0 : $branch); $this->view->currentModuleID = $currentModuleID; $this->view->gobackLink = (isset($output['from']) and $output['from'] == 'global') ? $this->createLink('testcase', 'browse', "productID=$productID") : ''; $this->view->stories = $stories; diff --git a/module/tree/model.php b/module/tree/model.php index 0a81768db4..64aaa9aa32 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -243,7 +243,7 @@ class treeModel extends model { /* If createdVersion <= 4.1, go to getOptionMenu(). */ $products = $this->loadModel('product')->getProductPairsByProject($rootID); - $branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noclosed'); + $branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products)); if(!$this->isMergeModule($rootID, 'task') or !$products) return $this->getOptionMenu($rootID, 'task', $startModule);