ItEr41S12CUInformeListaAvancesTrabajoItEr40S17: Fix bug showing task name

This commit is contained in:
Diego Pino Garcia 2009-12-28 13:13:39 +01:00 committed by Javier Moran Rua
parent 98c418eb0a
commit 816139f0cc

View file

@ -72,11 +72,7 @@ public class WorkingProgressPerTaskDTO {
public WorkingProgressPerTaskDTO(Task task, LocalDate date) {
this();
String taskName = task.getName();
if (taskName == null || taskName.isEmpty()) {
taskName = task.getOrderElement().getName();
}
this.taskName = taskName;
this.taskName = getTaskName(task);
this.estimatedHours = task.getHoursSpecifiedAtOrder();
this.totalPlannedHours = calculatePlannedHours(task, null);
@ -95,6 +91,14 @@ public class WorkingProgressPerTaskDTO {
this.ratioPlanningDifference = calculateRatioPlanningDifference(averageProgress, plannedProgress);
}
public String getTaskName(Task task) {
String result = task.getName();
if (result == null || result.isEmpty()) {
result = task.getOrderElement().getName();
}
return result;
}
public Integer calculatePlannedHours(Task task, LocalDate date) {
Integer result = new Integer(0);