ItEr36S11CUCreacionUnidadesPlanificacionItEr35S12: Avoding moving allocations computation if the start date is at the same day.
This commit is contained in:
parent
570129aea3
commit
5564fd613e
1 changed files with 5 additions and 1 deletions
|
|
@ -164,11 +164,15 @@ public abstract class TaskElement extends BaseEntity {
|
|||
if (newStartDate == null) {
|
||||
return;
|
||||
}
|
||||
boolean sameDay = new LocalDate(newStartDate).equals(new LocalDate(
|
||||
startDate));
|
||||
long durationMilliseconds = this.endDate.getTime()
|
||||
- this.startDate.getTime();
|
||||
this.startDate = newStartDate;
|
||||
this.endDate = new Date(this.startDate.getTime() + durationMilliseconds);
|
||||
moveAllocations();
|
||||
if (!sameDay) {
|
||||
moveAllocations();
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void moveAllocations();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue