From dc0dbaeb7cd9092bfe6fca3fa63c1bad66a84b36 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 27 Aug 2024 09:20:22 +0800 Subject: [PATCH] * [bug#36205] adjust project and execution statistic data for report api. --- api/v1/entries/reports.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/v1/entries/reports.php b/api/v1/entries/reports.php index 180db9199d..f68b23e28d 100644 --- a/api/v1/entries/reports.php +++ b/api/v1/entries/reports.php @@ -162,9 +162,9 @@ class reportsEntry extends entry $newProject->id = $project->id; $newProject->name = $project->name; $newProject->status = $project->status; - $newProject->progress = round($project->hours->progress, 1); - $newProject->totalConsumed = round($project->hours->totalConsumed, 1); - $newProject->totalLeft = round($project->hours->totalLeft, 1); + $newProject->progress = round($project->progress, 1); + $newProject->totalConsumed = round($project->totalConsumed, 1); + $newProject->totalLeft = round($project->totalLeft, 1); if(isset($project->delay)) $newProject->delay = $project->delay; $statusList['all']['total'] += 1; @@ -206,9 +206,9 @@ class reportsEntry extends entry $newExecution->id = $execution->id; $newExecution->name = $execution->name; $newExecution->status = $execution->status; - $newExecution->progress = round($execution->hours->progress, 1); - $newExecution->totalConsumed = round($execution->hours->totalConsumed, 1); - $newExecution->totalLeft = round($execution->hours->totalLeft, 1); + $newExecution->progress = round($execution->progress, 1); + $newExecution->totalConsumed = round($execution->totalConsumed, 1); + $newExecution->totalLeft = round($execution->totalLeft, 1); if(isset($execution->delay)) $newExecution->delay = $execution->delay; $statusList['all']['total'] += 1;