Create milestone plan issue based on each milestone date
The milestone plan issue is currently created on the 1st of the month, regardless of the release date.
According to the product development timeline, it should be created on the Monday 12 days before the milestone begins.
We need to be able to calculate in which milestone we're in based on when the script is run. According to product development timeline, the new milestone starts two days after the release day (Saturday), and it ends on the Friday of the previous week before the release (- 5 days).
The caveat is that the release date falls on the next milestone. So, when 16.6 is released, we're already in the 16.7 milestone. Programmatically, this would mean:
- Milestone start:
previous_release_date - 5 days
(Saturday before the previous release day) - Milestone end:
current_release_date - 6 days
(Friday before the current release day)
Let's take 16.7 for an example:
Edited by Achilleas Pipinellis