* [bug#67242,done,1h,0h] Fix testtask cases 2.5menu error.

This commit is contained in:
wangyuting
2025-11-18 14:30:34 +08:00
parent 6337469a00
commit bcaf98a291
+9 -2
View File
@@ -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;