correction ano column if label on orga
This commit is contained in:
parent
795a212810
commit
090471aa9e
|
@ -176,7 +176,10 @@ class ScrumController extends AbstractController
|
|||
$data=$em->getRepository($this->entity)->find($id);
|
||||
if(!$data) return $this->redirectToRoute($this->route);
|
||||
|
||||
$em->getRepository("App:Scrum")->getGitea($data,$giteaassignees,$giteacolumns,$giteamilestones,$giteateams,$giteaprioritys,$giteatypes,$gitealabels);
|
||||
$forcereload=false;
|
||||
if($request->get("forcereload")) $forcereload=$request->get("forcereload");
|
||||
|
||||
$em->getRepository("App:Scrum")->getGitea($data,$giteaassignees,$giteacolumns,$giteamilestones,$giteateams,$giteaprioritys,$giteatypes,$gitealabels,$forcereload);
|
||||
|
||||
// Préférences utilisateur
|
||||
$filtermilestones = $em->getRepository("App:User")->getUserpreference($this->getUser(),"filtermilestones",$id);
|
||||
|
@ -314,12 +317,13 @@ class ScrumController extends AbstractController
|
|||
public function info($id,Request $request)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$viewclosed = $request->getSession()->get("viewclosed");
|
||||
|
||||
// Rechercher du scrum en cours
|
||||
$scrum=$em->getRepository("App:Scrum")->find($id);
|
||||
if(!$scrum) return new JsonResponse(['message' => 'No Issue'], 403);
|
||||
|
||||
$giteaissues=$this->giteaservice->getIssues($scrum->getGiteajson()["owner"]["login"],$scrum->getGiteajson()["name"]);
|
||||
$giteaissues=$this->giteaservice->getIssues($scrum->getGiteajson()["owner"]["login"],$scrum->getGiteajson()["name"],"?state=".($viewclosed=="true"?"all":"open"));
|
||||
|
||||
$weights=[];
|
||||
foreach($giteaissues as $giteaissue) {
|
||||
|
|
|
@ -36,7 +36,7 @@ class ScrumRepository extends ServiceEntityRepository
|
|||
return $scrums;
|
||||
}
|
||||
}
|
||||
public function getGitea($scrum,&$giteaassignees,&$giteacolumns,&$giteamilestones,&$giteateams,&$giteaprioritys,&$giteatypes,&$gitealabels) {
|
||||
public function getGitea($scrum,&$giteaassignees,&$giteacolumns,&$giteamilestones,&$giteateams,&$giteaprioritys,&$giteatypes,&$gitealabels, $forcereload=false) {
|
||||
$viewclosed = $this->session->get("viewclosed");
|
||||
|
||||
// Récupérer le dernier order
|
||||
|
@ -151,7 +151,10 @@ class ScrumRepository extends ServiceEntityRepository
|
|||
if(!$giteaissue->milestone&&!is_null($scrumissue->getGiteamilestone()))
|
||||
$fgissueupdated=true;
|
||||
|
||||
//$fgissueupdated=true;
|
||||
if($forcereload) {
|
||||
$fgissueupdated=true;
|
||||
}
|
||||
|
||||
if($fgissueupdated) {
|
||||
$fgscrumupdate=true;
|
||||
$this->majissue($scrumissue,$giteaissue);
|
||||
|
@ -201,7 +204,7 @@ class ScrumRepository extends ServiceEntityRepository
|
|||
|
||||
$havecolumn=false;
|
||||
foreach($giteaissue->labels as $gitealabel) {
|
||||
$scrumcolumn=$this->_em->getRepository('App:Scrumcolumn')->findOneBy(["giteaid"=>$gitealabel->id]);
|
||||
$scrumcolumn=$this->_em->getRepository('App:Scrumcolumn')->findOneBy(["scrum"=>$scrumissue->getScrum(),"giteaid"=>$gitealabel->id]);
|
||||
if($scrumcolumn) {
|
||||
$havecolumn=true;
|
||||
$scrumissue->setScrumcolumn($scrumcolumn);
|
||||
|
|
Loading…
Reference in New Issue