For a project planning I have an initial period, lets call it PPStart-PPEnd
.
The planning is associated with a project. This also has a period PrjStart-PrjEnd
. PrjStart and PrjEnd are fixed, and can be unbound, i.e. the project start time or end time are not defined.
PPStart-PPEnd
should be adjusted so that people can only plan tasks in the valid project period. If that changes the duration, fine.
How do I efficiently limit PPStart-PPEnd
to PrjStart-PrjEnd
without having to go over all the possible combinations?
Maybe first detecting overlapping periods is a good start?
4 examples on a time axis ([-- = bound, <-- = unbound):
Project planning period:
[---PPStart-PPEnd---]
Project periods relative to ppp:
[---PrjStart-PrjEnd---] PPStart should be set to PrjStart, PPEnd unchanged
[---PrjStart-PrjEnd---] PPEnd should be set to PrjEnd, PPStart unchanged
[---PrjStart-PrjEnd-------------------> No adjustments
[---PrjStart-PrjEnd---] PPStart should be set to PrjStart and PPEnd to PrjEnd.
Cases like that last one make it complex.