From c2ac079bbbbea3f78e4211fb1ffb7513f98757d5 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 22 Nov 2021 14:01:02 +0800 Subject: [PATCH] * Modify the case module problem. --- module/testcase/control.php | 6 +++--- module/testcase/view/batchedit.html.php | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 9211d28112..e9656805a4 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -924,7 +924,7 @@ class testcase extends control $libraries = $this->loadModel('caselib')->getLibraries(); /* Set modules. */ - $modules = $this->tree->getOptionMenu($libID, $viewType = 'caselib', $startModuleID = 0, $branch); + $modules[$productID][$branch] = $this->tree->getOptionMenu($libID, $viewType = 'caselib', 0, $branch); $this->view->modules = $modules; $this->view->title = $libraries[$libID] . $this->lang->colon . $this->lang->testcase->batchEdit; @@ -947,11 +947,11 @@ class testcase extends control { $branches = $this->loadModel('branch')->getPairsByProjectProduct($this->session->project, $productID); } - foreach($branches as $branchID => $branchName) $modules[$branchID] = $this->tree->getOptionMenu($productID, $viewType = 'case', 0, $branchID); + foreach($branches as $branchID => $branchName) $modules[$productID][$branchID] = $this->tree->getOptionMenu($productID, 'case', 0, $branchID); } else { - $modules[0] = $this->tree->getOptionMenu($productID, $viewType = 'case', 0, 0); + $modules[$productID][0] = $this->tree->getOptionMenu($productID, 'case', 0, 0); } $this->view->branches = $branches; diff --git a/module/testcase/view/batchedit.html.php b/module/testcase/view/batchedit.html.php index 84f1a6c293..618903907c 100644 --- a/module/testcase/view/batchedit.html.php +++ b/module/testcase/view/batchedit.html.php @@ -80,7 +80,7 @@ foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName; } - $modules[$caseBranch] = $this->tree->getOptionMenu($cases[$caseID]->product, $viewType = 'case', 0, $caseBranch); + $modules[$caseProductID][$caseBranch] = $this->tree->getOptionMenu($cases[$caseID]->product, 'case', 0, $caseBranch); } ?> @@ -106,7 +106,8 @@ branch, "class='form-control chosen' onchange='loadBranches($branchProductID, this.value, $caseID)', $disabled");?> - ' style='overflow:visible'>module, "class='form-control chosen' onchange='loadStories($productID, this.value, $caseID)'");?> + + ' style='overflow:visible'>module, "class='form-control chosen' onchange='loadStories($productID, this.value, $caseID)'");?> ' style='overflow:visible'>story, "class='form-control chosen'");?>