Forráskód Böngészése

Corrections mineures

omassot 6 éve
szülő
commit
605473f9bc

+ 4 - 0
main/static/js/custom.js

@@ -192,6 +192,10 @@ $(document).ready( function () {
 		}
 	});
 	
+	$('#backlog-editor form input[name=value]').change(function() {
+		$(this).closest('form').submit();
+	});
+	
 	$("#backlog-editor").on('submit', 'form', function(event) {
 		event.preventDefault();
 		

+ 4 - 4
main/templates/reports/report_sprints.html

@@ -28,7 +28,7 @@
 			<div class="flex-col">
 			
 				<div class="flex-row">
-					<h4>Sprint #{{ sprint.id }} : {{ sprint.date_start|date:"d M. Y" }} au {{ sprint.date_end|date:"d M. Y" }}</h4>
+					<h4>Sprint #{{ sprint.number }} : {{ sprint.date_start|date:"d M. Y" }} au {{ sprint.date_end|date:"d M. Y" }}</h4>
 					{% if sprint.running %}<span class="running" style="margin-left: 14px;">En cours</span>{% endif %}
 				</div>
 				
@@ -55,10 +55,10 @@ var ctx = document.getElementById("chart-velocity").getContext('2d');
 var myChart = new Chart(ctx, {
 	type: 'line',
     data: {
-        labels: [{% for sprint in sprints|dictsort:"id" %}{% if not forloop.last %}"Sprint #{{ sprint.id }}",{% endif %}{% endfor %}],
+        labels: [{% for sprint in sprints|dictsort:"id" %}{% if sprint.closed %}"Sprint #{{ sprint.id }}",{% endif %}{% endfor %}],
         datasets: [{
             label: 'Vélocité réelle',
-            data: [{% for sprint in sprints|dictsort:"id" %}{% if not forloop.last %}{{ sprint.real_velocity }},{% endif %}{% endfor %}],
+            data: [{% for sprint in sprints|dictsort:"id" %}{% if sprint.closed %}{{ sprint.real_velocity }},{% endif %}{% endfor %}],
             backgroundColor: [
             	'rgba(255, 255, 255, 0.2)'
             ],
@@ -69,7 +69,7 @@ var myChart = new Chart(ctx, {
         },
         {
             label: 'Vélocité prévue',
-            data: [{% for sprint in sprints|dictsort:"id" %}{% if not forloop.last %}{{ sprint.planned_velocity }},{% endif %}{% endfor %}],
+            data: [{% for sprint in sprints|dictsort:"id" %}{% if sprint.closed %}{{ sprint.planned_velocity }},{% endif %}{% endfor %}],
             backgroundColor: [
                 'rgba(255, 255, 255, 0.2)'
             ],

+ 1 - 1
main/views.py

@@ -399,7 +399,7 @@ def report_activity(request):
         epics_activity[epic]["sixmonths"] = 0
         
     current = True
-    for sprint in Sprint.objects.filter(date_end__lt = datetime.datetime.today()).order_by('-date_start')[:12]:
+    for sprint in Sprint.objects.filter(date_end__lt = datetime.today()).order_by('-date_start')[:12]:
         for story in sprint.stories.all():
             if not story.epic:
                 continue