This commit is contained in:
afornerot 2022-01-13 21:13:38 +01:00
parent 59f16701a6
commit dd5c13027f
3 changed files with 40 additions and 34 deletions

View File

@ -238,6 +238,7 @@ class ScrumController extends AbstractController
} }
// Récupérer les issues de gitea // Récupérer les issues de gitea
$giteaissues=$this->giteaservice->getIssues($data->getGiteajson()["owner"]["login"],$data->getGiteajson()["name"]); $giteaissues=$this->giteaservice->getIssues($data->getGiteajson()["owner"]["login"],$data->getGiteajson()["name"]);
if(!is_array($giteaissues)) die("Probleme de connexion avec gitea veuillez vous <a href='/ninegitea/logout'>reconnecter</a>"); if(!is_array($giteaissues)) die("Probleme de connexion avec gitea veuillez vous <a href='/ninegitea/logout'>reconnecter</a>");
@ -259,6 +260,7 @@ class ScrumController extends AbstractController
$scrumissue->setGiteaid($giteaissue->id); $scrumissue->setGiteaid($giteaissue->id);
} }
if($scrumissue->getGiteajson()["updated_at"]!=json_decode(json_encode($giteaissue), true)["updated_at"]) {
$scrumissue->setGiteanumber($giteaissue->number); $scrumissue->setGiteanumber($giteaissue->number);
$scrumissue->setGiteastate($giteaissue->state); $scrumissue->setGiteastate($giteaissue->state);
$scrumissue->setGiteatitle($giteaissue->title); $scrumissue->setGiteatitle($giteaissue->title);
@ -274,7 +276,6 @@ class ScrumController extends AbstractController
$em->persist($scrumissue); $em->persist($scrumissue);
$em->flush(); $em->flush();
array_push($tbgiteaissues,$giteaissue->number);
$havecolumn=false; $havecolumn=false;
foreach($giteaissue->labels as $gitealabel) { foreach($giteaissue->labels as $gitealabel) {
@ -291,6 +292,8 @@ class ScrumController extends AbstractController
$em->persist($scrumissue); $em->persist($scrumissue);
$em->flush(); $em->flush();
} }
array_push($tbgiteaissues,$giteaissue->number);
}
$scrumissues=$data->getScrumissues(); $scrumissues=$data->getScrumissues();
foreach($scrumissues as $scrumissue) { foreach($scrumissues as $scrumissue) {
@ -300,6 +303,7 @@ class ScrumController extends AbstractController
} }
} }
// Préférences utilisateur // Préférences utilisateur
$filtermilestones = $em->getRepository("App:User")->getUserpreference($this->getUser(),"filtermilestones",$id); $filtermilestones = $em->getRepository("App:User")->getUserpreference($this->getUser(),"filtermilestones",$id);
$filterlabels = $em->getRepository("App:User")->getUserpreference($this->getUser(),"filterlabels",$id); $filterlabels = $em->getRepository("App:User")->getUserpreference($this->getUser(),"filterlabels",$id);
@ -311,6 +315,7 @@ class ScrumController extends AbstractController
return $this->render($this->render.'view.html.twig', [ return $this->render($this->render.'view.html.twig', [
'useheader' => true, 'useheader' => true,
'usesidebar' => false, 'usesidebar' => false,
'usetitle' => $data->getName(),
'giteaassignees' => $giteaassignees, 'giteaassignees' => $giteaassignees,
'giteacolumns' => $giteacolumns, 'giteacolumns' => $giteacolumns,
'giteamilestones' => $giteamilestones, 'giteamilestones' => $giteamilestones,

View File

@ -114,10 +114,10 @@
</div> </div>
<div class="card-body p-1" style="line-height:10px;"> <div class="card-body p-1" style="line-height:10px;">
<div class="d-inline-block"> <div>
<small> <small>
{{issue.giteanumber}} - {{ issue.giteatitle }}<br><br> {{issue.giteanumber}} - {{ issue.giteatitle }}<br><br>
<small>Crée le {{issue.giteajson.created_at|date("d/m/y")}}</small><small style ="float:right">Modifié le {{issue.giteajson.updated_at|date("d/m/y")}}</small><br><br>
{% for label in issue.giteajson.labels %} {% for label in issue.giteajson.labels %}
{% if label.id not in giteacolumns %} {% if label.id not in giteacolumns %}
<span class="btn-link tag" style="background-color:#{{label.color}}"> <span class="btn-link tag" style="background-color:#{{label.color}}">

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" /> <meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
<title>{% block title %}{{app.session.get("appname")}}{% endblock %}</title> <title>{% block title %}{{app.session.get("appname")}}{%if usetitle is defined %} = {{usetitle}} {%endif%}{% endblock %}</title>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
@ -55,6 +55,7 @@
<a class="navbar-brand" href="{{ path('app_home')}}"> <a class="navbar-brand" href="{{ path('app_home')}}">
<img src="/{{ appAlias }}/uploads/logo/{{app.session.get("logodark")}}" style="height:30px;margin-top:-3px;"> <img src="/{{ appAlias }}/uploads/logo/{{app.session.get("logodark")}}" style="height:30px;margin-top:-3px;">
{{app.session.get("appname")}} {{app.session.get("appname")}}
{%if usetitle is defined %} = {{usetitle}} {%endif%}
</a> </a>
{% if usesidebar is defined and usesidebar %} {% if usesidebar is defined and usesidebar %}