[Bug #1242] Return end date directly when calculating advance and percentage is 100%.
In that case, no calculations are needed, and since the algorithm has some defects we avoid them. FEA: ItEr75S04BugFixing
This commit is contained in:
parent
7518270ced
commit
13389197d9
1 changed files with 7 additions and 0 deletions
|
|
@ -568,6 +568,9 @@ public class TaskElementAdapter {
|
|||
BigDecimal percentage = new BigDecimal(assignedEffort
|
||||
.divivedBy(effort).doubleValue()).setScale(2,
|
||||
RoundingMode.HALF_UP);
|
||||
if (percentage.compareTo(BigDecimal.ONE) == 0) {
|
||||
return getEndDate();
|
||||
}
|
||||
|
||||
result = calculateLimitDateByPercentage(percentage);
|
||||
|
||||
|
|
@ -637,6 +640,10 @@ public class TaskElementAdapter {
|
|||
}
|
||||
|
||||
private GanttDate getAdvanceEndDate(BigDecimal advancePercentage) {
|
||||
if (advancePercentage.compareTo(BigDecimal.ONE) == 0) {
|
||||
return getEndDate();
|
||||
}
|
||||
|
||||
BigDecimal hours = BigDecimal.ZERO;
|
||||
|
||||
if (taskElement instanceof TaskGroup) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue