Iterations In GitLab
<!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
*This page may contain information related to upcoming products, features and functionality.
It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes.
Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.*
<!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
https://gitlab.com/gitlab-org/gitlab/issues/5135 and https://gitlab.com/gitlab-org/gitlab/issues/35290 introduce the ability for issues and merge requests to be assignable to more than one timebox. The purpose of this epic is to break down implications across the rest of the product so implementation can be discrete and parallelized.
### UX
#### Top of Iteration Report

#### Iteration Report Inheritance

#### Group By UX

### General Availability Minimum
Iterations became Generally Available in %13.2. History:
<details>
All checkboxed items will be shipped behind a feature flag in the release that they are completed. A secondary release post item will be created to align with the user journey of the feature. Once the GA milestone is reached, Iterations will be included as a primary item in the release post.
- [x] **I can click into the iterations list from the sidebar** - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31335
- [x] **I can click a button to create an iteration** - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31335
- [x] I can view a list of past iterations - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31335
- [x] I can click into a previous iteration to the iteration report - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31335
- [x] **I can enter an title (required)**
- [x] **I can enter description (optional)**
- [x] **I can enter a start date (required)**
- [x] **I can enter an end date (required)**
- [x] **I can can click a button to create the iteration after the fields were filled out**
- [x] **I can select the iteration an issue belongs to within the sidebar** (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/32361)
- [x] **I can remove an iteration from an issue via the sidebar** (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/32361)
- [x] I can view an iteration report that contains a list of issues assigned to the given iteration (https://gitlab.com/gitlab-org/gitlab/-/issues/218277) (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34379)
- [x] Iterations are auto-closed at 23:59:59 on the iteration's specified end date (part of https://gitlab.com/gitlab-org/gitlab/-/issues/227272)
</details>
### 13.5 Goals - Provide better progress reporting
- [x] Show iteration report via [inheritance model](https://gitlab.com/gitlab-org/gitlab/-/issues/218277#what-is-not-in-scope-for-this-mvc) (https://gitlab.com/gitlab-org/gitlab/-/issues/222763)
- [x] View burnup chart (https://gitlab.com/gitlab-org/gitlab/-/issues/222750)
- [x] View burndown chart (https://gitlab.com/gitlab-org/gitlab/-/issues/222741)
- [x] Toggle metrics / charts based on weight (https://gitlab.com/gitlab-org/gitlab/-/issues/222753)
- [ ] Toggle metrics / charts based on time (https://gitlab.com/gitlab-org/gitlab/-/issues/222754)
### 13.6/7 Goals - Integrate Iterations into other parts of GitLab
- [ ] Add "Group By" Project (when viewing the report from a group) (https://gitlab.com/gitlab-org/gitlab/-/issues/225498)
- [ ] Add "Group By" assignee (https://gitlab.com/gitlab-org/gitlab/-/issues/225499)
- [x] Add "Group By" label (https://gitlab.com/gitlab-org/gitlab/-/issues/225500)
- [ ] Show progress indicators for each grouping of issues (https://gitlab.com/gitlab-org/gitlab/-/issues/225501)
- [ ] Improve the Iteration list view (https://gitlab.com/gitlab-org/gitlab/-/issues/227272)
- [ ] Integrate Iterations into Boards (https://gitlab.com/gitlab-org/gitlab/-/issues/196804)
- [x] Filter by Iteration (https://gitlab.com/gitlab-org/gitlab/-/issues/118742)
- [ ] Sort by Iteration (https://gitlab.com/gitlab-org/gitlab/-/issues/196800)
- [ ] Bulk edit Iteration (https://gitlab.com/gitlab-org/gitlab/-/issues/196806)
### Misc
- [ ] I can view multiple pages of previous iterations
- [ ] Show more relevant Issue/MR card details based on what unit you are filtering your iteration report by. [1](/gitlab-org/gitlab/-/blob/master/!%5BScreen_Shot_2020-05-19_at_2.43.11_PM%5D(/uploads/a28caa3d7fdb01aa476cf5b79c1eb8bf/Screen_Shot_2020-05-19_at_2.43.11_PM.png))
- [ ] Improve ability to select set of labels to view "Group By" labels to reduce noise of all the labels you don't want to see. This should have a similar UX to that of selected labels that you want to have swimlanes for on Issue Boards.
- [ ] Add [Velocity/volatility](https://gitlab.com/groups/gitlab-org/-/epics/435) to the Iteration list View
- [ ] Better show [scope change](https://gitlab.com/groups/gitlab-org/-/epics/1957) within an iteration report
- [ ] Backport report view to Milestones
After :point_up:...
* [ ] Shamelessly copy [Pivotal Tracker's](https://www.pivotaltracker.com/help/articles/changing_project_settings/) project settings for "Iterations and Velocity"
* [x] Auto-move issues from one iteration to the next
* [ ] Incorporate iterations and analytics/reports into Boards...
### Technical Considerations
- GraphQL First
- Pajamas First
- Iterations live at the group level
- There can only ever be one active iteration / in progress at a time
#### Iteration State
Ideally we would work towards this sort of state model:
- An iteration can be **upcoming**. The start date is in the future.
- An iteration can be **in progress**. That current date is on/between the start date and the end date.
- An iteration can be **done**. The current date is after the end date.
- An iteration can be **archived** but not deleted. This is less destructive than deletion and allows for traceability / audit trails.
As for validations:
- An issue can never belong to more than 1 in progress iteration.
- An iteration cannot be assigned a start and end date that overlaps with another iteration's timebox.
Original description:
<details>
This is the first step in implementing multiple milestones for Issues, Merge Requests and Epics (https://gitlab.com/gitlab-org/gitlab/issues/5135)
To keep changes to a minimum, I think we can start by preparing our backend storage to support multiple milestones while keeping everything else working the same way.
The idea is to create separate tables `issue_milestones`, `merge_request_milestones`, and `epic_milestones` and then reading / writing to that instead of `milestone_id`. Old data would have to be migrated too.
We would still support just 1 milestone for now and then we would need something like:
```ruby
def milestone
milestones.first
end
def milestone=(milestone)
self.milestones = [milestone]
end
```
Though in reality it's not that simple and a lot of things may break. Here are some things mentioned previously that need to be considered:
1. API
1. Webhooks
1. Quick actions
1. Filters
1. Epic milestone date calculation
1. Any code that has `where(milestone_id: ...)` would break and would need to a `JOIN` now.
</details>
epic