From f53d3c4ab5bdb1916f645f77f4724c31313900c7 Mon Sep 17 00:00:00 2001 From: Jeppe Krogh Date: Tue, 12 Dec 2023 14:20:06 +0100 Subject: [PATCH] Calling new sprintReport methods from controller --- src/Controller/SprintReportController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Controller/SprintReportController.php b/src/Controller/SprintReportController.php index 63aeba6c..68b0db5d 100644 --- a/src/Controller/SprintReportController.php +++ b/src/Controller/SprintReportController.php @@ -38,11 +38,11 @@ public function index(Request $request): Response 'csrf_protection' => false, ]); - $projects = $this->projectTracker->getAllProjects(); + $projectCollection = $this->projectTracker->getAllProjectsV2(); $projectChoices = []; - foreach ($projects as $project) { + foreach ($projectCollection->projects as $project) { $projectChoices[$project->name] = $project->id; } @@ -66,11 +66,11 @@ public function index(Request $request): Response } if (!empty($requestData['projectId'])) { - $project = $this->projectTracker->getProject($requestData['projectId']); - $versions = $this->projectTracker->getProjectMilestones($requestData['projectId']); + $project = $this->projectTracker->getProjectV2($requestData['projectId']); + $versionCollection = $this->projectTracker->getProjectVersions($requestData['projectId']); $versionChoices = []; - foreach ($versions as $version) { + foreach ($versionCollection->versions as $version) { $versionChoices[$version->headline] = $version->id; }