Connect Merge Requests To Tasks
## Problem There is no way to associate a merge request to a work item from within the work item. ## Proposal Create a ["hard linked" MR](https://gitlab.com/gitlab-org/gitlab/-/issues/353614) from `/create_merge_request <branch name>` quick action. Provide a way to define a target project in quick action. Ideally, project selection supports autocomplete. A project would be required when creating an MR from a group work item. It would be optional if the work item is owned by a project. The development widget updates in real time. If a work item is referenced in an MR description, branch name, or commit message using the appropriate syntax, create a "hard" relationship to the referenced work item. The development widget updates in real time. ## UX https://gitlab.com/gitlab-org/gitlab/-/issues/427975+ ## Acceptance criteria **Displaying relationships** _In all cases this means 'implements'/'closes' relationship_ * [x] Shows merge requests with state, title, and assignee * [x] Includes MR popover on title hover * [x] Includes user tooltip on assignee hover * [x] Includes `+ # more` truncation after 3 items * [x] User can click to reveal all items * [x] MR details (title, state, assignee) are synced (no refresh needed) * [x] Relationships are added/removed without refresh * [x] Shows "i" indicator with tooltip when work item will be closed by MR * [x] Indicates when the work item _was closed_ by the MR **Managing relationships** * [x] Can link MR to work item from MR using existing closing patterns --- **Internal Events** Include tracking based off of the internal event tracking method. See [here](https://docs.gitlab.com/ee/development/internal_analytics/internal_event_instrumentation/quick_start.html#quick-start-for-internal-event-tracking) for details. ### Release notes ![task-merge-requests](/uploads/dc9cfcfa826c0b993ec9ebaf5c2b3776/task-merge-requests.png) Tasks are frequently used to break down issues into engineering implementation steps. Before this release, there was no way to connect a merge request to a task it implements. You can now use the same [closing pattern](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) that you would when referencing issues from a merge request description to connect a merge request to a task. From the task view, connected merge requests are visible from the sidebar. If your project has the [auto-close setting enabled](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#disable-automatic-issue-closing), the task will automatically close when the connected merge request is merged into your default branch.
issue