View roadmap epics with early/late start/finish
- Planned start date: Epic's start date, if it exists.
- Planned end date: Epic's end date, if it exists.
- Actual start date:
- If there are no issues in the epic, actual start date is null.
- If all issues are open, then actual start date is null. (We ignore the fact that some issues might have went into in progress and then gone back to open. This is a simplifying assumption so that we don't have to account for history when looking at an epic with all open issues.)
- Find the closest to negative infinity earliest non-null enter-in-progress timestamp. If it exists, this is the actual start date.
- If haven't found an actual start date yet, then take the closest to negative infinity non-null closed_at timestamp. (This is necessary if all issues just switched directly from open to closed.)
- Otherwise, the actual start date is null. (This can happen if all the issues are legacy closed issues with no closed_at dates).
- Actual end date:
- If there are no issues in the epic, actual end date is null.
- If there is at least one open issue, the actual end date is null.
- If there is at least one in progress issue, the actual end date is null.
- Otherwise, look at all closed_at timestamps of all the closed issues. Take the one closest to positive infinity. That is the epic actual end date.
- Some legacy issues don't have closed_at timestamps. If all the closed issues in the epic here don't have a closed_at timestamp, the actual end date is null.
System constraints, simplifying assumptions, and cases
- Per https://gitlab.com/gitlab-org/gitlab-ee/issues/3556, planned start date (PS) <= planned end date (PE) always, if both exist (i.e. non-null).
- Per algorithm above, actual start date (AS) <= actual end date (AE) always, if both exist (i.e. non-null).
- If AS is null, take AE as null, to simplify the problem.
- T means Today.
- Lots of different cases. To do: Work with engineering to figure out what is the right approach to simplify the scenarios so that development is not too complicated.
Designs
Edited by Victor Wu