Allow to specify a IntraDayDate when resizing a task

FEA: ItEr61S08TimeUnitConfigurablePlanning
This commit is contained in:
Óscar González Fernández 2010-10-05 20:58:24 +02:00
parent 6cc0c37ca4
commit 07df77601f

View file

@ -316,11 +316,16 @@ public abstract class TaskElement extends BaseEntity {
}
public void resizeTo(Scenario scenario, Date endDate) {
resizeTo(scenario,
IntraDayDate.startOfDay(LocalDate.fromDateFields(endDate)));
}
public void resizeTo(Scenario scenario, IntraDayDate endDate) {
if (!canBeResized()) {
return;
}
boolean sameDay = this.endDate.areSameDay(endDate);
setEndDate(endDate);
boolean sameDay = this.endDate.areSameDay(endDate.getDate());
setIntraDayEndDate(endDate);
if (!sameDay) {
moveAllocations(scenario);
}