Fix bug
The global constraints to apply depend on the point, globalStartConstraints can't always be applied. FEA: ItEr64OTS03PlanificacionHaciaAtras
This commit is contained in:
parent
e1fbe76a4d
commit
1ca56bd7f8
1 changed files with 14 additions and 1 deletions
|
|
@ -1388,10 +1388,23 @@ public class GanttDiagramGraph<V, D extends IDependency<V>> implements
|
|||
result.addAll(getDependenciesConstraintsFor(getPrimaryPoint()));
|
||||
result.addAll(getTaskConstraints(getPrimaryPoint()));
|
||||
}
|
||||
result.addAll(globalStartConstraints);
|
||||
result.addAll(getGlobalConstraintsToApply(getPrimaryPoint()));
|
||||
return result;
|
||||
}
|
||||
|
||||
private Collection<Constraint<GanttDate>> getGlobalConstraintsToApply(
|
||||
Point point) {
|
||||
Validate.isTrue(isSupportedPoint(point));
|
||||
switch (point) {
|
||||
case START:
|
||||
return globalStartConstraints;
|
||||
case END:
|
||||
return globalEndConstraints;
|
||||
default:
|
||||
throw new RuntimeException("shouldn't happen");
|
||||
}
|
||||
}
|
||||
|
||||
protected List<Constraint<GanttDate>> getConstraintsForSecondaryPoint() {
|
||||
return getDependenciesConstraintsFor(getSecondaryPoint());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue