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();
$scrum=$em->getRepository($this->entity)->find($id);
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);
@ -689,6 +689,7 @@ class ScrumController extends AbstractController
$viewclosed = $this->get('session')->get("viewclosed");
foreach($issues as $issue) {
// bypass closed
if($viewclosed=="false"&&($issue->getGiteastate()=="closed"||($issue->getScrumsprint()&&$issue->getScrumsprint()->getClosed()))) continue;

View File

@ -87,7 +87,8 @@ class ScrumissueController extends AbstractController
if(!$giteaissue) return new JsonResponse(['message' => 'No API getIssue'], 403);
$updateissue=new \DateTime(json_decode(json_encode($giteaissue), true)["updated_at"]);
$updateissue->setTimezone(new \DateTimeZone("UTC"));
$em->getRepository("App:Scrum")->majissue($scrumissue,$giteaissue,false);
$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->setGiteastate($giteaissue->state);
$scrumissue->setGiteatitle($giteaissue->title);