svg
This commit is contained in:
@ -26,6 +26,30 @@ class HomeController extends AbstractController
|
|||||||
return $this->noproject();
|
return $this->noproject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$redmine = $this->redmineService->getProject($project->getId(), $this->getParameter('redmineApikey'));
|
||||||
|
$project->setRedmine($redmine);
|
||||||
|
$this->redmineService->majProjectIssues($project, $this->getParameter('redmineApikey'), false);
|
||||||
|
|
||||||
|
$predmine = $project->getRedmine();
|
||||||
|
|
||||||
|
foreach ($project->getIssues() as $issue) {
|
||||||
|
foreach ($predmine['sprints'] as $key => $sprint) {
|
||||||
|
if ($sprint['id'] === $issue->getRedmine()['sprint']['agile_sprint_id']) {
|
||||||
|
if (!array_key_exists('story_points', $predmine['sprints'][$key])) {
|
||||||
|
$predmine['sprints'][$key]['story_points']['total'] = 0;
|
||||||
|
}
|
||||||
|
$predmine['sprints'][$key]['story_points']['total'] += $issue->getRedmine()['sprint']['story_points'];
|
||||||
|
|
||||||
|
if (!array_key_exists($issue->getRedmine()['status']['id'], $predmine['sprints'][$key]['story_points'])) {
|
||||||
|
$predmine['sprints'][$key]['story_points'][$issue->getRedmine()['status']['id']] = 0;
|
||||||
|
}
|
||||||
|
$predmine['sprints'][$key]['story_points'][$issue->getRedmine()['status']['id']] += $issue->getRedmine()['sprint']['story_points'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$project->setRedmine($predmine);
|
||||||
|
|
||||||
return $this->render('home/home.html.twig', [
|
return $this->render('home/home.html.twig', [
|
||||||
'usemenu' => true,
|
'usemenu' => true,
|
||||||
'usesidebar' => false,
|
'usesidebar' => false,
|
||||||
|
@ -83,7 +83,7 @@ class ProjectController extends AbstractController
|
|||||||
$redmine = $this->redmineService->getProject($project->getId(), $this->getParameter('redmineApikey'));
|
$redmine = $this->redmineService->getProject($project->getId(), $this->getParameter('redmineApikey'));
|
||||||
$project->setRedmine($redmine);
|
$project->setRedmine($redmine);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
$this->redmineService->majProjectIssues($project, $this->getParameter('redmineApikey'), false);
|
$this->redmineService->majProjectIssues($project, $this->getParameter('redmineApikey'), true);
|
||||||
|
|
||||||
return $this->redirectToRoute('app_admin_project');
|
return $this->redirectToRoute('app_admin_project');
|
||||||
}
|
}
|
||||||
|
@ -203,9 +203,11 @@ class RedmineService
|
|||||||
// Calcul de la position sprint
|
// Calcul de la position sprint
|
||||||
$issueSprintId = $rissue['sprint']['agile_sprint_id'];
|
$issueSprintId = $rissue['sprint']['agile_sprint_id'];
|
||||||
$sprintPosition = '';
|
$sprintPosition = '';
|
||||||
foreach ($project->getRedmine()['sprints'] as $sprint) {
|
$sprintIndex = null;
|
||||||
|
foreach ($project->getRedmine()['sprints'] as $key => $sprint) {
|
||||||
if ($sprint['id'] === $issueSprintId) {
|
if ($sprint['id'] === $issueSprintId) {
|
||||||
$sprintPosition = $sprint['id']; // ou $index + 1 si tu veux position humaine
|
$sprintPosition = $sprint['id'];
|
||||||
|
$sprintIndex = $key;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
{% block localstyle %}
|
{% block localstyle %}
|
||||||
<style>
|
<style>
|
||||||
|
small {
|
||||||
|
font-size:70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
verysmall {
|
||||||
|
font-size:60%;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -53,6 +61,10 @@
|
|||||||
margin-bottom:5px;
|
margin-bottom:5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sprintCardHeader {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
.versionCard {
|
.versionCard {
|
||||||
background-color: var(--bs-gray-100);
|
background-color: var(--bs-gray-100);
|
||||||
padding: 5px 5px 0px 5px;
|
padding: 5px 5px 0px 5px;
|
||||||
@ -85,6 +97,9 @@
|
|||||||
.issueAction{
|
.issueAction{
|
||||||
align-self: baseline;
|
align-self: baseline;
|
||||||
padding: 0px 2px 0px 5px;
|
padding: 0px 2px 0px 5px;
|
||||||
|
text-align:center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa-eye {
|
.fa-eye {
|
||||||
@ -146,8 +161,11 @@
|
|||||||
{% for sprint in project.redmine.sprints|reverse %}
|
{% for sprint in project.redmine.sprints|reverse %}
|
||||||
{% if sprint.id not in project.hiddensprints %}
|
{% if sprint.id not in project.hiddensprints %}
|
||||||
<div class='sprintCard sprintCard{{sprint.id}} card' style='margin-bottom:20px'>
|
<div class='sprintCard sprintCard{{sprint.id}} card' style='margin-bottom:20px'>
|
||||||
<div class='card-header'>
|
<div class='sprintCardHeader card-header'>
|
||||||
Sprint = {{ sprint.name }}
|
<div style='flex-grow:1'>Sprint = {{ sprint.name }}</div>
|
||||||
|
{% if sprint.story_points[status.id] is defined %}
|
||||||
|
<div>{{ sprint.story_points[status.id] }}</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% for version in project.redmine.versions|reverse %}
|
{% for version in project.redmine.versions|reverse %}
|
||||||
@ -199,6 +217,7 @@
|
|||||||
<div class='issueSubject'>{{issue.redmine.subject}}</div>
|
<div class='issueSubject'>{{issue.redmine.subject}}</div>
|
||||||
<div class='issueAction'>
|
<div class='issueAction'>
|
||||||
<i class='fas fa-eye' onClick='fetchAndRenderIssue({{issue.id}})'></i>
|
<i class='fas fa-eye' onClick='fetchAndRenderIssue({{issue.id}})'></i>
|
||||||
|
<verysmall>{{issue.redmine.sprint.story_points}}</verysmall>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='issueBody'>
|
<div class='issueBody'>
|
||||||
@ -216,6 +235,14 @@
|
|||||||
<script>
|
<script>
|
||||||
let showIssuebody = false;
|
let showIssuebody = false;
|
||||||
|
|
||||||
|
function adjustHeight() {
|
||||||
|
console.log("here");
|
||||||
|
let ele = $(".issueDescription");
|
||||||
|
if (ele.length) {
|
||||||
|
ele.css("height", window.innerHeight - ele.offset().top + "px");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function showhide() {
|
function showhide() {
|
||||||
// Statut
|
// Statut
|
||||||
selected = $('#statusFilter').val();
|
selected = $('#statusFilter').val();
|
||||||
@ -266,6 +293,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
// Ranger les issues
|
||||||
$('.issueCard').each(function () {
|
$('.issueCard').each(function () {
|
||||||
const id = $(this).data('status')+'-'+$(this).data('sprint')+'-'+$(this).data('version');
|
const id = $(this).data('status')+'-'+$(this).data('sprint')+'-'+$(this).data('version');
|
||||||
const $column = $(`[data-id='${id}']`);
|
const $column = $(`[data-id='${id}']`);
|
||||||
@ -277,6 +305,8 @@
|
|||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Afficher le scrum après rangement
|
||||||
$('.scrumContainer').css('display', 'flex');
|
$('.scrumContainer').css('display', 'flex');
|
||||||
|
|
||||||
// Filtre
|
// Filtre
|
||||||
@ -288,6 +318,10 @@
|
|||||||
// issueBody
|
// issueBody
|
||||||
$('#toggleIssueBody').on('click',toogleIssueBody);
|
$('#toggleIssueBody').on('click',toogleIssueBody);
|
||||||
toogleIssueBody();
|
toogleIssueBody();
|
||||||
|
|
||||||
|
// Ajuste height
|
||||||
|
adjustHeight();
|
||||||
|
window.addEventListener("resize", adjustHeight);
|
||||||
});
|
});
|
||||||
|
|
||||||
function fetchAndRenderIssue(issueId) {
|
function fetchAndRenderIssue(issueId) {
|
||||||
@ -303,6 +337,8 @@
|
|||||||
$('.issueContainer').html(html);
|
$('.issueContainer').html(html);
|
||||||
$('.issueContainer').show();
|
$('.issueContainer').show();
|
||||||
$('.scrumContainer').css('padding-left','750px');
|
$('.scrumContainer').css('padding-left','750px');
|
||||||
|
$('.issueDescription').animate({scrollTop: 0}, 0);
|
||||||
|
adjustHeight();
|
||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
console.error('Erreur lors du chargement de l’issue :', error);
|
console.error('Erreur lors du chargement de l’issue :', error);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<small class="text-muted">Projet : {{ issue.redmine.project.name }} • Tracker : {{ issue.redmine.tracker.name }}</small>
|
<small class="text-muted">Projet : {{ issue.redmine.project.name }} • Tracker : {{ issue.redmine.tracker.name }}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body" style="height:500px;overflow-y:auto">
|
<div class="issueDescription card-body" style="height:500px;overflow-y:auto">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="mb-3" style="flex-grow:0.5">
|
<div class="mb-3" style="flex-grow:0.5">
|
||||||
<strong>Statut :</strong> {{ issue.redmine.status.name }}<br>
|
<strong>Statut :</strong> {{ issue.redmine.status.name }}<br>
|
||||||
@ -70,6 +70,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{dump(issue.project.redmine)}}
|
||||||
{{dump(issue.redmine)}}
|
{{dump(issue.redmine)}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user