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