From bcaf98a291ac4edf43a939be79488e3fc72fce09 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Tue, 18 Nov 2025 14:24:14 +0800 Subject: [PATCH] * [bug#67242,done,1h,0h] Fix testtask cases 2.5menu error. --- module/testtask/control.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/module/testtask/control.php b/module/testtask/control.php index 0c81c9ddd6..4f2fb9739f 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1243,8 +1243,15 @@ class testtask extends control */ public function ajaxGetDropMenu(int $productID, string $branch, int $taskID, string $module, string $method, string $objectType = '', int $objectID = 0) { - $scope = empty($objectType) ? 'local' : 'all'; - $testtasks = $this->testtask->getProductTasks($productID, $branch, "$scope,totalStatus", '', '', 'id_desc', null); + if($objectType && ($objectType == 'project' || $objectType == 'execution') && $objectID) + { + $testtasks = $objectType == 'project' ? $this->testtask->getProjectTasks($objectID, 0, 'id_desc', null) : $this->testtask->getExecutionTasks($objectID, 0, 'execution', 'id_desc', null); + } + else + { + $scope = empty($objectType) ? 'local' : 'all'; + $testtasks = $this->testtask->getProductTasks($productID, $branch, "$scope,totalStatus", '', '', 'id_desc', null); + } $namePairs = array(); foreach($testtasks as $testtaskID => $testtask) $namePairs[$testtaskID] = $testtask->name;