[Bug #1304] Reorder the code to improve the performance with TaskGroups.
FEA: ItEr75S04BugFixing
This commit is contained in:
parent
7c158ad7f6
commit
c2889c88b7
1 changed files with 7 additions and 4 deletions
|
|
@ -592,6 +592,13 @@ public class TaskElementAdapter {
|
|||
|
||||
private GanttDate getAdvanceEndDate(BigDecimal advancePercentage) {
|
||||
BigDecimal hours = BigDecimal.ZERO;
|
||||
|
||||
if (taskElement instanceof TaskGroup) {
|
||||
//progess calculation for TaskGroups is done with
|
||||
//this method, which is much lighter
|
||||
return calculateLimitDateByPercentage(advancePercentage);
|
||||
}
|
||||
|
||||
if (taskElement.getOrderElement() != null) {
|
||||
if(taskElement.getParent() == null){
|
||||
//it's an order, we use the cached value
|
||||
|
|
@ -604,10 +611,6 @@ public class TaskElementAdapter {
|
|||
}
|
||||
}
|
||||
|
||||
if (taskElement instanceof TaskGroup) {
|
||||
return calculateLimitDateByPercentage(advancePercentage);
|
||||
}
|
||||
|
||||
// Calculate date according to advanceHours or advancePercentage
|
||||
final Integer advanceHours = advancePercentage.multiply(
|
||||
hours).intValue();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue