ItEr38S05ValidacionEProbasFuncionaisItEr37S06: [Bug #154] Fixing bug.
Returning a constraint not earlier than when it is a milestone
This commit is contained in:
parent
eb2b8c5f06
commit
34fd31505f
1 changed files with 4 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ import org.navalplanner.business.planner.entities.Dependency;
|
|||
import org.navalplanner.business.planner.entities.StartConstraintType;
|
||||
import org.navalplanner.business.planner.entities.Task;
|
||||
import org.navalplanner.business.planner.entities.TaskElement;
|
||||
import org.navalplanner.business.planner.entities.TaskMilestone;
|
||||
import org.navalplanner.business.planner.entities.TaskStartConstraint;
|
||||
import org.navalplanner.business.planner.entities.Dependency.Type;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -377,6 +378,9 @@ public class TaskElementAdapter implements ITaskElementAdapter {
|
|||
default:
|
||||
throw new RuntimeException("can't handle " + constraintType);
|
||||
}
|
||||
} else if (taskElement instanceof TaskMilestone) {
|
||||
return Collections.singletonList(DateConstraint
|
||||
.biggerOrEqualThan(taskElement.getStartDate()));
|
||||
} else {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue