When there are no deviations in 'Task Completion Chart' because there are
not tasks, return an empty array with 6 values equal to 0

FEA: ItEr76S15OrganizingPerProjectDashboard
This commit is contained in:
Diego Pino 2012-05-08 23:16:58 +02:00
parent a2470de890
commit 5422bd1a33

View file

@ -359,9 +359,9 @@ public class DashboardModel implements IDashboardModel {
// Get deviations of finished tasks, calculate max, min and delta
List<Double> deviations = getTaskLagDeviations();
if (deviations.isEmpty()) {
return result;
}
if (deviations.size() == 1) {
max = Double.valueOf(3);
min = Double.valueOf(-2);
} else if (deviations.size() == 1) {
max = deviations.get(0).doubleValue() + 3;
min = deviations.get(0).doubleValue() - 2;
} else {