ItEr41S12CUInformeListaAvancesTrabajoItEr40S17: Fix bug showing task name
This commit is contained in:
parent
98c418eb0a
commit
816139f0cc
1 changed files with 9 additions and 5 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue