Change the way score are grouped

pull/69/head
Alinson S. Xavier 10 years ago
parent 7da4ddf91b
commit 2d87076a48

@ -124,7 +124,7 @@ public class ScoreListTest
{
toggleRepetitions(0, 20);
int expectedValues[] = { 12629351, 11006461, 7272612, 2800230 };
int expectedValues[] = { 11434978, 7894999, 3212362 };
int actualValues[] = habit.scores.getAllValues(7);
assertThat(actualValues, equalTo(expectedValues));

@ -218,7 +218,7 @@ public class ScoreList
compute(from, to);
divisor *= DateHelper.millisecondsInOneDay;
Long offset = to + divisor - 1;
Long offset = to + divisor;
String query = "select ((timestamp - ?) / ?) as time, avg(score) from Score " +
"where habit = ? and timestamp >= ? and timestamp <= ? " +

Loading…
Cancel
Save