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);
// 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);
return new JsonResponse([]);

View File

@ -790,8 +790,10 @@
},
success: function(data) {
var tbassignees=[];
for (let assignee of data.giteajson.assignees) {
tbassignees.push(assignee.login);
if(data.giteajson.assignees) {
for (let assignee of data.giteajson.assignees) {
tbassignees.push(assignee.login);
}
}
$('#modal-assignees').select2();
@ -811,7 +813,7 @@
url: "{{path("app_scrumissue_assigne")}}",
data: {
id:$("#modal-issueid").val(),
assignees:$("#modal-assignees").val(),
assignees: $("#modal-assignees").val(),
},
success: function(data) {
location.reload();