Fixed date alignement bug.
This commit is contained in:
parent
efd8193009
commit
7a770e562b
@ -207,10 +207,10 @@ public class AgirStatool
|
||||
for (Project subProject : project.subProjects())
|
||||
{
|
||||
refreshPage(subProject);
|
||||
if (project.getName().equals("Chapril"))
|
||||
{
|
||||
System.exit(0);
|
||||
}
|
||||
// if (project.getName().equals("Chapril"))
|
||||
// {
|
||||
// System.exit(0);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -271,7 +271,7 @@ public class AgirStatool
|
||||
|
||||
StringList sql = new StringList();
|
||||
sql.append("SELECT");
|
||||
sql.append(" concat_ws('-', year(closed_on), month(closed_on), weekofyear(closed_on)) as date, ");
|
||||
sql.append(" yearweek(closed_on, 3) as date, ");
|
||||
sql.append(" count(*) as count ");
|
||||
sql.append("FROM ");
|
||||
sql.append(" issues ");
|
||||
@ -353,7 +353,7 @@ public class AgirStatool
|
||||
|
||||
StringList sql = new StringList();
|
||||
sql.append("SELECT ");
|
||||
sql.append(" concat_ws('-', year(created_on), month(created_on), weekofyear(created_on)) as date, ");
|
||||
sql.append(" yearweek(created_on,3) as date, ");
|
||||
sql.append(" count(*) as count ");
|
||||
sql.append("FROM ");
|
||||
sql.append(" issues ");
|
||||
|
@ -89,14 +89,14 @@ public class AgirStatoolUtils
|
||||
|
||||
LocalDate normalizedEnd = normaliseWeekDate(end);
|
||||
LocalDate date = normaliseWeekDate(start);
|
||||
int index = source.indexOf(start.format(DateTimeFormatter.ofPattern("yyyy-M-w")));
|
||||
int index = source.indexOf(start.format(DateTimeFormatter.ofPattern("yyyyw")));
|
||||
if (index == -1)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd))
|
||||
{
|
||||
String dateToken = date.format(DateTimeFormatter.ofPattern("yyyy-M-w"));
|
||||
String dateToken = date.format(DateTimeFormatter.ofPattern("yyyyw"));
|
||||
long count;
|
||||
if (index < source.size())
|
||||
{
|
||||
@ -144,7 +144,7 @@ public class AgirStatoolUtils
|
||||
long count = 0;
|
||||
while (date.isBefore(end) || date.isEqual(end))
|
||||
{
|
||||
String dateToken = date.format(DateTimeFormatter.ofPattern("yyyy-M-w"));
|
||||
String dateToken = date.format(DateTimeFormatter.ofPattern("yyyyw"));
|
||||
DateCount current = source.get(dateToken);
|
||||
if (current != null)
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ public class CreatedConcludedCountChartView
|
||||
{
|
||||
logger.info("Building created/closed x months chart view…");
|
||||
|
||||
if (project.hasIssue() && !project.getName().equals("*"))
|
||||
if (project.hasIssue())
|
||||
{
|
||||
String source = XidynUtils.load(AgirStatool.class.getResource("/org/april/agirstatool/core/pages/chartLineView.xhtml"));
|
||||
String code = XidynUtils.extractBodyContent(source);
|
||||
|
@ -35,7 +35,7 @@ var myChart = new Chart(ctx,
|
||||
pointBorderWidth: 0.00000001
|
||||
},
|
||||
{
|
||||
label: 'Closed',
|
||||
label: 'Concluded',
|
||||
data: [1, 5, 9, 13, 15, 22] ,
|
||||
backgroundColor: 'rgba(75, 192, 192, 0.2)',
|
||||
borderColor: 'rgba(75, 192, 192, 1)',
|
||||
|
Loading…
Reference in New Issue
Block a user