Autocomplete should make it possible to search for closed merge requests

Similar to gitlab-ce#39059; that one deals with closed issues, whereas this deals with closed merge requests.

(We are a paying GitLab EE Starter customer.)

Description

At the moment, when writing e.g. an issue or a merge request Description, you can easily search for merge requests by !abs (to search for merge requests containing "abs"). You can also type gitlab-ce!30161 to search for an open MR (open at the time of writing this), but you cannot search for gitlab-ce!1024 (merged three years ago). The link will still work once the issue/MR is created, it's just the auto-completion when typing the text that is broken. You have to go into the Preview tab to see if you go the merge request number right.

This is annoying, since sometimes you write (in a new MR) a reference to an old MR, like "This adds frobnication support t the new functionality originally introduced in !xyz (ticket #abc)". While going into the Preview tab works, it's far from convenient.

Proposal

I see two options:

  1. Autocomplete should also show "recently" merged MRs, or, more generally, MRs with some recent updates. There should be discussion on what does mean "recently", and the dropdown list should make it clear that such MRs are closed.

  2. Differentiate between searching for !foo (which would only search for open MRs) and !xyz (i.e. the MR number), which would search for an exact match in all MR:s - regardless of age. A simple popup displaying the MR title (and perhaps indicating that it is closed) would be enough here.

Option 2 is in some ways more powerful, since it means you can refer to MR:s which was closed months or years ago with ease. I would guess that it's more complex to implement than 1 though?

Option 1 would have the advantage that it's more useful for people who don't remember MR numbers (which is probably most of us from time to time...). Being able to also search for the title is convenient.

I would be fine with either way, since both of them would be an improvement to what we currently have.

Links / references

  • gitlab-ce#39059: Autocomplete should propose recently updated issues, even when there are closed

Feature checklist

Make sure these are completed before closing the issue, with a link to the relevant commit.

  • Feature assurance
  • Documentation
  • Added to features.yml
Assignee Loading
Time tracking Loading