feat(#20): possibilité d'assigner des intervenants sur un ticket

This commit is contained in:
afornerot 2024-06-14 15:07:35 +02:00
parent 0249b6cfae
commit a2d1841631
2 changed files with 6 additions and 4 deletions

View File

@ -289,7 +289,7 @@ class ScrumissueController extends AbstractController
if(!$scrumissue) return new JsonResponse(['message' => 'No Issue'], 403); if(!$scrumissue) return new JsonResponse(['message' => 'No Issue'], 403);
// Affecter l'issue // Affecter l'issue
$response=$this->giteaservice->patchissue($scrumissue->getScrum()->getGiteajson()["owner"]["login"],$scrumissue->getScrum()->getGiteajson()["name"],$scrumissue->getGiteanumber(),["assignees"=>$assignees]); $response=$this->giteaservice->patchissue($scrumissue->getScrum()->getGiteajson()["owner"]["login"],$scrumissue->getScrum()->getGiteajson()["name"],$scrumissue->getGiteanumber(),["assignees"=>($assignees?$assignees:[])]);
if(!$response) return new JsonResponse(['message' => 'Error api'], 403); if(!$response) return new JsonResponse(['message' => 'Error api'], 403);
return new JsonResponse([]); return new JsonResponse([]);

View File

@ -790,9 +790,11 @@
}, },
success: function(data) { success: function(data) {
var tbassignees=[]; var tbassignees=[];
if(data.giteajson.assignees) {
for (let assignee of data.giteajson.assignees) { for (let assignee of data.giteajson.assignees) {
tbassignees.push(assignee.login); tbassignees.push(assignee.login);
} }
}
$('#modal-assignees').select2(); $('#modal-assignees').select2();
$('#modal-assignees').val(tbassignees); $('#modal-assignees').val(tbassignees);