[VSA] New issue <> MR relationships

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Background

There are currently 3 ways to associate an MR with an issue:

  1. Mentioning the issue number in the MR description.
  2. Mentioning the issue number in a commit message in the MR.
  3. Starting the MR branch name with the issue number, like 1234-new-feature.

Note: The "Create merge request" button that appears in every issue uses both 1 and 2.

Problem to solve

From: #271174 (comment 483154163)

  • We are trying to change VSA so that issues are the only unit of work being measured
  • In order to do this, we need to have a greater understanding around the relationship between issues and MRs
  • The current way of identifying related MRs for an Issue (see below) is error prone and not widely used
Example scenario
  1. Developer merges a new feature in MR1 which completes ISSUE1 in the value stream
  2. Developer creates a new ISSUE2 to capture any work follow-up work required and marks it as related as MR1 and ISSUE1 (since it's follow-up work)
  3. Developer then opens and MR2 to complete the rest of the work

In this scenario, the work from MR1 would be counted twice. ISSUE2 would also contain a merged MR that would display MR1's work in a later stage of the value stream before that stage is even started.

Proposal

Create more concrete relationships between MR and issue by:

  1. Adding an additional relationship concept of contributes/implements
    • Implements or contributes = contributes to the work
    • Closes [exists] = resolves the issue and contributes to work
    • Relates [exists] = connected but not counted as work
  2. Making it easier/more reliable to see/define these relationships in the UI (beyond magic comments). This could be surfaced in both the issue UI and MR UI in a similar way to issues being blocked...

MVC recommendation: Implement (1) with magic comments and follow-up in the next iteration with (2).

Before After
Screenshot_2021-01-13_at_12.34._2x Screenshot_2021-01-13_at_12.34._2x
Edited by 🤖 GitLab Bot 🤖