Skip to content

Commit

Permalink
Corrected some leantime api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppekroghitk committed Jan 23, 2024
1 parent aa7b4bf commit ca181c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Service/LeantimeApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public function getAllSprints(): array
*/
public function getTicketsInSprint(string $sprintId): array
{
$result = $this->request(self::API_PATH_JSONRPC, 'POST', 'leantime.rpc.tickets.getAll', ['sprint' => $sprintId]);
$result = $this->request(self::API_PATH_JSONRPC, 'POST', 'leantime.rpc.tickets.getAll', ['searchCriteria' => ['sprint' => $sprintId]]);

return $result;
}
Expand Down Expand Up @@ -366,7 +366,7 @@ public function getPlanningData(): PlanningData
$sprintIssues = [];

$allSprints = $this->getAllSprints();

foreach ($allSprints as $sprintData) {
// Expected sprint name examples:
// DEV sprint uge 2-3-4.23
Expand Down Expand Up @@ -539,7 +539,7 @@ public function getTimesheetsForTicket(string $ticketId): mixed
*/
private function getIssuesForProjectMilestone($projectId, $milestoneId): array
{
return $this->request(self::API_PATH_JSONRPC, 'POST', 'leantime.rpc.tickets.getAll', ['currentProject' => $projectId, 'milestone' => $milestoneId]);
return $this->request(self::API_PATH_JSONRPC, 'POST', 'leantime.rpc.tickets.getAll', ['searchCriteria' => ['currentProject' => $projectId, 'milestone' => $milestoneId]]);
}

/**
Expand Down Expand Up @@ -602,7 +602,7 @@ public function getSprintReportData(string $projectId, string $versionId): Sprin
}
}
$worklogs = $this->getTimesheetsForTicket($issueEntry->id);

foreach ($worklogs as $worklog) {
$workLogStarted = strtotime($worklog->workDate);

Expand Down

0 comments on commit ca181c2

Please sign in to comment.