note sur les issues et report pv propal
This commit is contained in:
parent
4c9b0a1db2
commit
442718316d
|
@ -173,6 +173,10 @@ app_report_csv:
|
|||
path: /user/report/csv/{id}
|
||||
defaults: { _controller: App\Controller\ReportController:csv }
|
||||
|
||||
app_report_milestone:
|
||||
path: /user/report/milestone/{idscrum}/{mode}/{month}
|
||||
defaults: { _controller: App\Controller\ReportController:milestone }
|
||||
|
||||
app_report_test:
|
||||
path: /user/report/test/{id}
|
||||
defaults: { _controller: App\Controller\ReportController:test }
|
||||
|
@ -214,8 +218,6 @@ app_scrum_info:
|
|||
path: /user/scrum/info/{id}
|
||||
defaults: { _controller: App\Controller\ScrumController:info }
|
||||
|
||||
|
||||
|
||||
#== Scrumcolumn ========================================================================================================
|
||||
app_scrumcolumn_submit:
|
||||
path: /master/scrumcolumn/submit/{scrumid}
|
||||
|
@ -237,7 +239,6 @@ app_scrumcolumn_order:
|
|||
path: /master/scrumcolumn/order/{scrumid}
|
||||
defaults: { _controller: App\Controller\ScrumcolumnController:order }
|
||||
|
||||
|
||||
#== Scrumteam ========================================================================================================
|
||||
app_scrumteam_submit:
|
||||
path: /master/scrumteam/submit/{scrumid}
|
||||
|
@ -259,7 +260,6 @@ app_scrumteam_order:
|
|||
path: /master/scrumteam/order/{scrumid}
|
||||
defaults: { _controller: App\Controller\ScrumteamController:order }
|
||||
|
||||
|
||||
#== Scrumpriority ========================================================================================================
|
||||
app_scrumpriority_submit:
|
||||
path: /master/scrumpriority/submit/{scrumid}
|
||||
|
@ -302,7 +302,6 @@ app_scrumsprint_order:
|
|||
path: /master/scrumsprint/order/{scrumid}
|
||||
defaults: { _controller: App\Controller\ScrumsprintController:order }
|
||||
|
||||
|
||||
#== Scrumtype ========================================================================================================
|
||||
app_scrumtype_submit:
|
||||
path: /master/scrumtype/submit/{scrumid}
|
||||
|
@ -357,6 +356,10 @@ app_scrumissue_assigne:
|
|||
path: /user/scrumissue/assigne
|
||||
defaults: { _controller: App\Controller\ScrumissueController:assigne }
|
||||
|
||||
app_scrumissue_notes:
|
||||
path: /user/scrumissue/notes
|
||||
defaults: { _controller: App\Controller\ScrumissueController:notes }
|
||||
|
||||
app_scrumissue_ctrlchange:
|
||||
path: /user/scrumissue/ctrlchange
|
||||
defaults: { _controller: App\Controller\ScrumissueController:ctrlchange }
|
||||
|
|
|
@ -42,3 +42,4 @@ services:
|
|||
volumes:
|
||||
mariadb-data:
|
||||
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ use App\Service\giteaService;
|
|||
|
||||
class ReportController extends AbstractController
|
||||
{
|
||||
private KernelInterface $appKernel;
|
||||
private giteaService $giteaservice;
|
||||
|
||||
public function __construct(KernelInterface $appKernel, giteaService $giteaservice) {
|
||||
$this->appKernel = $appKernel;
|
||||
$this->giteaservice = $giteaservice;
|
||||
|
@ -114,6 +117,80 @@ class ReportController extends AbstractController
|
|||
|
||||
}
|
||||
|
||||
public function milestone($idscrum,$mode,$month,Request $request) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$scrum = $em->getRepository("App:Scrum")->find($idscrum);
|
||||
$datestart=new \DateTime($month."01");
|
||||
$dateend=new \DateTime($month."31");
|
||||
|
||||
$repoid = $scrum->getGiteaid();
|
||||
$repoowner = $scrum->getGiteajson()["owner"]["login"];
|
||||
$reponame = $scrum->getGiteajson()["name"];
|
||||
|
||||
//$scrumissues = $em->getRepository("App:Scrumissue")->findBy(["scrum"=>$scrum,"giteastate"=>"open"],["giteamilestonename"=>"ASC","rowid"=>"DESC"]);
|
||||
$scrumissues = $em->getRepository("App:Scrumissue")->findBy(["scrum"=>$scrum],["giteamilestonename"=>"ASC","rowid"=>"DESC"]);
|
||||
|
||||
$reportissues=[];
|
||||
foreach($scrumissues as $scrumissue) {
|
||||
$labels=array_column($scrumissue->getGiteajson()["labels"], 'name');
|
||||
$update=new \DateTime($scrumissue->getGiteajson()["updated_at"]);
|
||||
$close=new \DateTime($scrumissue->getGiteajson()["closed_at"]);
|
||||
//"created_at" => "2024-05-03T15:09:26+02:00"
|
||||
//"updated_at" => "2024-05-03T16:02:00+02:00"
|
||||
//"closed_at" => "2024-05-03T16:01:59+02:00"
|
||||
|
||||
//if(in_array("Type/Scénario",$labels)&&in_array("Statut/Backlog",$labels)) {
|
||||
//if(in_array("Type/Scénario",$labels)) {
|
||||
|
||||
// Dans le cas d'un report Propal on ne prend que les tickets ouvert de type scénario du backlog
|
||||
$ok=false;
|
||||
|
||||
if($mode=="Propal") {
|
||||
if(in_array("Type/Scénario",$labels)&&in_array("Statut/Backlog",$labels)&&$scrumissue->getGiteastate()=="open") {
|
||||
$ok=true;
|
||||
}
|
||||
}
|
||||
|
||||
// Dans le cas d'un report PV on prend tout les tickets avec une date de modification ou de cloture dans le mois
|
||||
if($mode=="PV") {
|
||||
$isstatut=false;
|
||||
$isupdate=false;
|
||||
$isclose=false;
|
||||
|
||||
if(in_array("Statut/Livré PREPROD",$labels) || in_array("Statut/A Livrer PROD",$labels) || in_array("Statut/Livré PROD",$labels)) {
|
||||
$isstatut=true;
|
||||
}
|
||||
|
||||
if(!empty($close)&&$close>=$datestart&&$close<=$dateend) $isclose=true;
|
||||
if($update>=$datestart&&$update<=$dateend) $isupdate=true;
|
||||
|
||||
if($isstatut&&($isclose||$isupdate)) $ok=true;
|
||||
}
|
||||
|
||||
if(!$ok) continue;
|
||||
|
||||
$tmp= [
|
||||
"id" => $scrumissue->getGiteanumber(),
|
||||
"title" => $scrumissue->getGiteatitle(),
|
||||
"milestone" => ($scrumissue->getGiteamilestonename()??"Aucun"),
|
||||
"statutorder" => $scrumissue->getScrumcolumn()->getRowid(),
|
||||
"statut" => $scrumissue->getScrumcolumn()->getName(),
|
||||
"issueorder" => $scrumissue->getRowid(),
|
||||
];
|
||||
array_push($reportissues,$tmp);
|
||||
}
|
||||
|
||||
$statutsort = array_column($reportissues,"statutorder");
|
||||
$issuesort = array_column($reportissues,"statutorder");
|
||||
$milestonesort = array_column($reportissues,"milestone");
|
||||
array_multisort($statutsort, SORT_ASC, $milestonesort, SORT_ASC, $issuesort, SORT_ASC, $reportissues);
|
||||
|
||||
return $this->render('Report/milestone.html.twig', [
|
||||
'useheader' => true,
|
||||
'issues' => $reportissues,
|
||||
]);
|
||||
}
|
||||
|
||||
public function test($id,Request $request)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
|
|
@ -140,6 +140,7 @@ class ScrumissueController extends AbstractController
|
|||
$output=[];
|
||||
$output["weight"]=$scrumissue->getWeight();
|
||||
$output["giteajson"]=$scrumissue->getGiteajson();
|
||||
$output["notes"]=$scrumissue->getNotes();
|
||||
|
||||
return new JsonResponse($output);
|
||||
}
|
||||
|
@ -297,6 +298,25 @@ class ScrumissueController extends AbstractController
|
|||
|
||||
}
|
||||
|
||||
|
||||
public function notes(Request $request)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$id=$request->get('id');
|
||||
$notes=$request->get('notes');
|
||||
|
||||
// Rechercher l'issue en cours
|
||||
$scrumissue=$em->getRepository("App:Scrumissue")->find($id);
|
||||
if(!$scrumissue) return new JsonResponse(['message' => 'No Issue'], 403);
|
||||
$scrumissue->setNotes($notes);
|
||||
$em->flush();
|
||||
|
||||
return new JsonResponse([]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function color(Request $request)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
|
|
@ -38,6 +38,11 @@ class Scrumissue
|
|||
*/
|
||||
private $color;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
private $notes;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
|
@ -350,4 +355,16 @@ class Scrumissue
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getNotes(): ?string
|
||||
{
|
||||
return $this->notes;
|
||||
}
|
||||
|
||||
public function setNotes(?string $notes): self
|
||||
{
|
||||
$this->notes = $notes;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{% extends "base.html.twig" %}
|
||||
|
||||
{% block body %}
|
||||
{% set statut="" %}
|
||||
{% set milestone="" %}
|
||||
{% for issue in issues %}
|
||||
{% if statut!=issue.statut %}
|
||||
<p> </p>
|
||||
<h2>{{issue.statut}}</h2>
|
||||
{% set statut=issue.statut %}
|
||||
{% set milestone="" %}
|
||||
{% endif %}
|
||||
|
||||
{% if milestone!=issue.milestone %}
|
||||
<p> </p>
|
||||
<h3>{{issue.milestone}}</h3>
|
||||
{% set milestone=issue.milestone %}
|
||||
{% endif %}
|
||||
|
||||
<li>{{issue.id}} = {{ issue.title }}</li>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
|
@ -35,6 +35,11 @@
|
|||
margin-right:5px;
|
||||
}
|
||||
|
||||
.tooltip-inner {
|
||||
text-align: left !important; /* Aligne le texte à gauche */
|
||||
white-space: pre-line; /* Conserve les retours à la ligne */
|
||||
}
|
||||
|
||||
.assignee {
|
||||
width:30px;
|
||||
margin: 5px 5px 0px 0px;
|
||||
|
@ -57,7 +62,6 @@
|
|||
{% set start = microtime(true) %}
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<div id="filters" class="d-flex flex-column pl-2 pr-2 " style="width:350px; background-color:var(--colorbgbodydark);min-height:1500px;">
|
||||
<div style="width:100%" class="mt-3">
|
||||
<label class="control-label" style="color:var(--colorftbodydark)">Filtre JALONS</label>
|
||||
|
@ -163,7 +167,7 @@
|
|||
|
||||
{% for column in tbissues %}
|
||||
<div class="d-inline-block mt-3 align-top mb-5 p-2" data-column="{{column.gicol}}" style="width: 18rem;">
|
||||
<h2 style="text-transform: uppercase; text-align:center; font-size:28px">{{ column.nmcol }}</h2>
|
||||
<h2 style="text-transform: uppercase; text-align:center; font-size:26px">{{ column.nmcol }}</h2>
|
||||
<div class="card-body p-1">
|
||||
{% for jalon in column.jalons %}
|
||||
{% for sprint in jalon.sprints %}
|
||||
|
@ -199,6 +203,7 @@
|
|||
{% set datatypes="" %}
|
||||
{% set dataprioritys="datapriority"~giteaprioritys|last %}
|
||||
{% set issuprioritycolor=prioritycolor %}
|
||||
|
||||
{% for label in issue.giteajson.labels %}
|
||||
{% if label.id not in giteacolumns and label.id in giteateams %}
|
||||
{% set datateams=datateams~"datateam"~label.id~" " %}
|
||||
|
@ -228,7 +233,9 @@
|
|||
{% set backcolor="background-color:"~issue.scrumissueblock.color~";" %}
|
||||
{% endif %}
|
||||
|
||||
<div id="issu{{ issue.id }}" data-id="{{ issue.id }}" data-issue="{{ issue.id }}" data-column="{{column.gicol}}" data-milestone="{{jalon.gijal}}" data-sprint="{{sprint.idspr}}" class="card mb-1 issue issue-{{issue.id}} {{datateams}} {{datatypes}} {{dataprioritys}} {{datalabels}} {{dataassignees}} state-{{issue.giteastate}}" style="border-left: 10px solid {{issuprioritycolor}}">
|
||||
{% set notes=(not issue.notes is empty?issue.notes|striptags|replace({'\n': '<br>', '\r': '<br>'})|raw:"") %}
|
||||
|
||||
<div id="issu{{ issue.id }}" data-id="{{ issue.id }}" data-issue="{{ issue.id }}" data-column="{{column.gicol}}" data-milestone="{{jalon.gijal}}" data-sprint="{{sprint.idspr}}" class="card mb-1 issue issue-{{issue.id}} {{datateams}} {{datatypes}} {{dataprioritys}} {{datalabels}} {{dataassignees}} state-{{issue.giteastate}}" style="border-left: 10px solid {{issuprioritycolor}}" {{ (not notes is empty?'title='~notes:'') }}>
|
||||
<div class="card-footer p-1 d-flex" style="line-height:16px; border-top:none; {{ backcolor }}" >
|
||||
<div class="flex-grow-1 d-flex align-items-center" style="max-width:224px";>
|
||||
<div class="pr-2 issu-id" style="cursor:move">
|
||||
|
@ -320,6 +327,13 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div id="notesissu{{ issue.id }}" class="notesissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
|
||||
<i class="btn fas fa-clipboard p-0 m-0 fa-fw pl-1 pl-1"></i>
|
||||
<span style="cursor:pointer;">
|
||||
Notes
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input type="text" id="colorissu{{ issue.id }}" data-issue="{{ issue.id }}" class="pick-a-color form-control form-control spectrum sp-colorize" value="{{issue.color}}" autocomplete="off">
|
||||
</div>
|
||||
|
@ -485,6 +499,29 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mymodalnotes" class="modal" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<input type="hidden" id="modal-issueid" name="modal-issueid" required="required" class=" form-control" value="">
|
||||
|
||||
<div style="width:100%">
|
||||
<textarea id="modal-notes" style="width:100%; height:300px;">
|
||||
</textarea>
|
||||
</div>
|
||||
<button id="issu_notes" class="btn btn-success mt-3">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set end = microtime(true) %}
|
||||
{% set duration = end - start %}
|
||||
<p>render time: {{ duration }} seconds</p>
|
||||
|
@ -515,6 +552,14 @@
|
|||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".issue").tooltip({
|
||||
content: function() {
|
||||
return $(this).data('tooltip'); // Utilise le contenu de l'attribut data-tooltip
|
||||
},
|
||||
items: '[data-tooltip]', // Spécifie les éléments qui déclenchent le tooltip
|
||||
html: true // Autorise le HTML dans le tooltip (si nécessaire pour certains tooltips personnalisés)
|
||||
});
|
||||
|
||||
// Apply Filter
|
||||
function showhide() {
|
||||
// Vue condensée
|
||||
|
@ -830,6 +875,44 @@
|
|||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.notesissu',function(){
|
||||
$(".modal-title").html("#"+$(this).data("giteaid")+" - "+$(this).data("giteatitle"));
|
||||
$("#modal-issueid").val($(this).data("issue"));
|
||||
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{path("app_scrumissue_info")}}",
|
||||
data: {
|
||||
id:$("#modal-issueid").val(),
|
||||
},
|
||||
success: function(data) {
|
||||
$('#modal-notes').val(data.notes);
|
||||
|
||||
$("#mymodalnotes").modal('show');
|
||||
$(".submenu").hide();
|
||||
$("#modal-notes").focus();
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("#issu_notes").click(function(){
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{path("app_scrumissue_notes")}}",
|
||||
data: {
|
||||
id:$("#modal-issueid").val(),
|
||||
notes: $("#modal-notes").val(),
|
||||
},
|
||||
success: function(data) {
|
||||
location.reload();
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
alert("pb sur enregistrement du ticket");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Filter Milestones
|
||||
function filtermilestones() {
|
||||
$.ajax({
|
||||
|
|
Loading…
Reference in New Issue