Add method to retrieve theoretical progress.
FEA: ItEr75S27PerProjectDashboard
This commit is contained in:
parent
c80e174c5d
commit
eed5bfe2ea
2 changed files with 8 additions and 1 deletions
|
|
@ -72,7 +72,8 @@ public class DashboardController extends GenericForwardComposer {
|
|||
String out = dashboardModel.getPercentageOfFinishedTasks().toString() + " " +
|
||||
dashboardModel.getPercentageOfInProgressTasks() + " " +
|
||||
dashboardModel.getPercentageOfReadyToStartTasks() + " " +
|
||||
dashboardModel.getPercentageOfBlockedTasks();
|
||||
dashboardModel.getPercentageOfBlockedTasks() + "\n" +
|
||||
dashboardModel.getTheoreticalAdvancePercentageByHoursUntilNow();
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ package org.libreplan.web.dashboard;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.MathContext;
|
||||
import java.util.Date;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -70,6 +71,11 @@ public class DashboardModel {
|
|||
return taskStatusStats.get(TaskStatusEnum.BLOCKED);
|
||||
}
|
||||
|
||||
public BigDecimal getTheoreticalAdvancePercentageByHoursUntilNow(){
|
||||
BigDecimal ratio = getRootTask().getTheoreticalAdvancePercentageUntilDate(new Date());
|
||||
return ratio.multiply(BigDecimal.TEN).multiply(BigDecimal.TEN);
|
||||
}
|
||||
|
||||
private void calculateTaskStatusStatistics() {
|
||||
AccumulateTasksStatusVisitor visitor = new AccumulateTasksStatusVisitor();
|
||||
TaskElement rootTask = getRootTask();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue