optiomisation tbestim

This commit is contained in:
afornerot 2024-06-14 20:46:08 +02:00
parent 8bc58f6966
commit b155036347
3 changed files with 5 additions and 3 deletions

View File

@ -663,7 +663,7 @@ class ScrumController extends AbstractController
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$scrum=$em->getRepository($this->entity)->find($id); $scrum=$em->getRepository($this->entity)->find($id);
if(!$scrum) return $this->redirectToRoute($this->route); if(!$scrum) return $this->redirectToRoute($this->route);
$em->getRepository("App:Scrum")->getGitea($scrum,$giteaassignees,$giteacolumns,$giteamilestones,$giteateams,$giteaprioritys,$giteatypes,$gitealabels); //$em->getRepository("App:Scrum")->getGitea($scrum,$giteaassignees,$giteacolumns,$giteamilestones,$giteateams,$giteaprioritys,$giteatypes,$gitealabels);
$tbestim=$this->getEstim($scrum); $tbestim=$this->getEstim($scrum);
@ -689,6 +689,7 @@ class ScrumController extends AbstractController
$viewclosed = $this->get('session')->get("viewclosed"); $viewclosed = $this->get('session')->get("viewclosed");
foreach($issues as $issue) { foreach($issues as $issue) {
// bypass closed // bypass closed
if($viewclosed=="false"&&($issue->getGiteastate()=="closed"||($issue->getScrumsprint()&&$issue->getScrumsprint()->getClosed()))) continue; if($viewclosed=="false"&&($issue->getGiteastate()=="closed"||($issue->getScrumsprint()&&$issue->getScrumsprint()->getClosed()))) continue;

View File

@ -87,6 +87,7 @@ class ScrumissueController extends AbstractController
if(!$giteaissue) return new JsonResponse(['message' => 'No API getIssue'], 403); if(!$giteaissue) return new JsonResponse(['message' => 'No API getIssue'], 403);
$updateissue=new \DateTime(json_decode(json_encode($giteaissue), true)["updated_at"]); $updateissue=new \DateTime(json_decode(json_encode($giteaissue), true)["updated_at"]);
$updateissue->setTimezone(new \DateTimeZone("UTC")); $updateissue->setTimezone(new \DateTimeZone("UTC"));
$em->getRepository("App:Scrum")->majissue($scrumissue,$giteaissue,false);
$lastupdate=$scrumissue->getScrum()->getUpdatedate(); $lastupdate=$scrumissue->getScrum()->getUpdatedate();

View File

@ -278,7 +278,7 @@ class ScrumRepository extends ServiceEntityRepository
} }
} }
function majissue($scrumissue,$giteaissue,$issubmit) { public function majissue($scrumissue,$giteaissue,$issubmit) {
$scrumissue->setGiteanumber($giteaissue->number); $scrumissue->setGiteanumber($giteaissue->number);
$scrumissue->setGiteastate($giteaissue->state); $scrumissue->setGiteastate($giteaissue->state);
$scrumissue->setGiteatitle($giteaissue->title); $scrumissue->setGiteatitle($giteaissue->title);