From 37d75e0f998326dfc56ea2e9f84cc8a3bb53a40b Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Sat, 9 Sep 2023 06:10:26 +0000 Subject: [PATCH] * Fix bug #38204. --- module/testreport/control.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/testreport/control.php b/module/testreport/control.php index 29e9d061e9..c20b6eae13 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -251,22 +251,22 @@ class testreport extends control $execution = $this->execution->getById($executionID); $tasks = $this->testtask->getExecutionTasks($executionID, $objectType); - $task = $objectID ? $this->testtask->getById($objectID) : key($tasks); + $task = $objectID ? $this->testtask->getById($extra) : key($tasks); $owners = array(); $buildIdList = array(); $productIdList = array(); - foreach($tasks as $i => $task) + foreach($tasks as $i => $testtask) { - if(!empty($extra) and strpos(",{$extra},", ",{$task->id},") === false) + if(!empty($extra) and strpos(",{$extra},", ",{$testtask->id},") === false) { unset($tasks[$i]); continue; } - $owners[$task->owner] = $task->owner; - $productIdList[$task->product] = $task->product; - $this->setChartDatas($task->id); - if($task->build != 'trunk') $buildIdList[$task->build] = $task->build; + $owners[$testtask->owner] = $testtask->owner; + $productIdList[$testtask->product] = $testtask->product; + $this->setChartDatas($testtask->id); + if($testtask->build != 'trunk') $buildIdList[$testtask->build] = $testtask->build; } if(count($productIdList) > 1) {