Objective
There should be a quick access to the current Milestones from within the Sidebar. They are displayed below the « Backlog » entry and they are shown by default.
There are at most 2 levels of milestones displayed (eg Release > Sprint). If the project is using 3+ plannings (eg Product > Release > Sprint > Iterations) only the first 2 levels are displayed.
Protections:
- At project level, it's possible to deactivate the display of milestones below backlog (in Backlog Administration).
- At site level, it's possible to deactivate the display of milestones globally (flag in case of big issue, either functional or performance related).
Definitions
- Current & open milestone: Artifact's status semantic is open and the current date is after or equal to the start date of the timeframe semantic of the artifact. The date comparison is done using UNIX timestamps (UTC timezone).
- start date and end date of the timeframe semantic must be not null nor zero both
The milestones order is the same than the one of GET project/{id}/milestones?fields=all&query={period=current}&limit=10&order=asc
route used by "Project Milestones" widget.
Rendering
Mockup: https://www.figma.com/file/LNjPWxdhaaVtecZy4RmzWd/Milestones-below-Backlog?type=design&node-id=0-1&mode=design&t=jgqlwj2gkrLd7jL1-0
At most 5 milestones, the user can view, are displayed. They are displayed hierarchically:
The count of the 5 milestones is done following a tree traversal strategy. Example, given the following open and current milestones & submilestones
- Milestone A
- Submilestone A.1
- Submilestone A.2
- Submilestone A.3
- Submilestone A.4
- Milestone B
What will be rendered is
- Milestone A
- Submilestone A.1
- Submilestone A.2
- Submilestone A.3
- Submilestone A.4
Only current milestones are rendered, hierarchically. Example, given the following:
- Milestone A (current & open)
- Submilestone A.1 (past)
- Submilestone A.2 (current & closed)
- Submilestone A.3 (next)
- Submilestone A.4 (current & open)
- Milestone B (closed)
- Submilestone B.1 (current & open)
- Milestone C (current & open)
- Submilestones C1 (current & open)
What will be rendered is
- Milestone A (current & open)
- Submilestone A.4 (current & open)
- Milestone C (current & open)
- Submilestones C1 (current & open)
Limits and exclusions
- A milestone tracker must have defined the title semantic, the status semantic and the timeframe semantic. If one of those is missing, it's not rendered in sidebar.
- Permissions apply, only artifact a user can view (artifact permission, field permission, tracker permission) are rendered.
Sidebar component & MediaWiki
MediaWiki will fetch the informations related to the user at login time. It’s acceptable to not fetch again the content of the Sidebar (hence possible new milestones) until the next login.
If we ever need to refresh, the strategy should be the same as for the other sidebar refresh : send a logout command for a given instance (as we do when a service is enabled and we need to see it in MW as well).
Todo
Mockups: