feat(#20): possibilité d'assigner des intervenants sur un ticket
This commit is contained in:
parent
0249b6cfae
commit
a2d1841631
|
@ -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([]);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue