Bug #1529: Avoid exception in Cost tab in project details
The problem is that SumChargedEffort is null when it shouldn't, so the order is marked to be recalculated if this is the case. This is a workaround for the issue described in the bug #1529, while we're not able to reproduce the problem. FEA: ItEr77S04BugFixing
This commit is contained in:
parent
84d7daf160
commit
7e0295166c
1 changed files with 9 additions and 3 deletions
|
|
@ -197,9 +197,15 @@ public class AssignedHoursToOrderElementModel implements IAssignedHoursToOrderEl
|
|||
if (orderElement.getChildren().isEmpty()) {
|
||||
return EffortDuration.zero();
|
||||
}
|
||||
EffortDuration assignedDirectChildren = getTotalAssignedEffort().minus(
|
||||
this.assignedDirectEffort);
|
||||
return assignedDirectChildren;
|
||||
EffortDuration totalAssignedEffort = getTotalAssignedEffort();
|
||||
// FIXME Once we're able to reproduce and fix the cause of bugs like
|
||||
// #1529, we could remove this if
|
||||
if (totalAssignedEffort.compareTo(assignedDirectEffort) < 0) {
|
||||
orderElement.getOrder()
|
||||
.markAsNeededToRecalculateSumChargedEfforts();
|
||||
return EffortDuration.zero();
|
||||
}
|
||||
return totalAssignedEffort.minus(this.assignedDirectEffort);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue