This commit is contained in:
2025-07-09 22:12:43 +02:00
parent 0a178899d7
commit 1cc4db4943
5 changed files with 207 additions and 28 deletions

View File

@ -238,6 +238,15 @@ class RedmineService
}
}
}
// Parent
foreach ($project->getIssues() as $issue) {
$parent = null;
if (array_key_exists('parent', $issue->getRedmine())) {
$parent = $this->issueRepository->find($issue->getRedmine()['parent']['id']);
}
$issue->setParent($parent);
}
}
public function getProjectIssues(int $projectId, string $apiKey, ?\DateTimeInterface $updatedSince = null): array
@ -251,7 +260,7 @@ class RedmineService
'project_id' => $projectId,
'limit' => $limit,
'offset' => $offset,
'status_id' => '*', // Inclure toutes les issues
'status_id' => '*',
];
if (null !== $updatedSince) {
@ -274,6 +283,7 @@ class RedmineService
$issues = $data['issues'] ?? [];
foreach ($issues as $key => $issue) {
$issues[$key] = $this->getIssue($issue['id'], $apiKey);
$issues[$key]['sprint'] = $this->getIssueAgile($issue['id'], $apiKey);
}