Improve consistency and usability of search results for issue/MR by iid (and more)
Description
- On gitlab.com (uses elastic search):
- Typing
#42
in the navbar search returns all issues with iid 42 across all projects but defaults toProjects
tab, which is empty. - Typing
#42
in the navbar search when scoped by "this project" within gitlab-org/gitlab-ce returns issue with iid 42. - Typing
#42
in the issue filter on the issue list returns issues that have#42
in the content, but not issue 42.
- Typing
- On our instance (no elastic search):
- Typing
#42
in the global search returns all issues with iid 42 across all projects but defaults toProjects
tab, which is empty. - Typing
#42
in the global search scoped by "this project" on a given project which has an issue with iid 42 does not return said issue. - Typing
#42
in the issue filter on the issue list returns issues that have gitlab-ce#42 in the content, but not issue 42.
- Typing
- At no point typing
#
in the field provided autocompletion as when typing in an issue/comment field.
Proposal
- In navbar search when scoped by the project, when
#
is typed, provide a list of matching issues in the dropdown behaving in the same way as within description/comment textareas, and go directly to the issue, not to search results. - In navbar search when unscoped, there should be some feedback indicating that the
#
prefix is being recognised and that it'll search for an exact issue id match. Perform some autocompletion if at all possible (performance concerns? many projects UI?). Once search is triggered, the search result should go directly toIssues
tab. - In issue list filter (and board list filter), make
#
a search token (likeauthor:
) which lists only the issue with matching iid. - Make it work whether or not Elastic Search is enabled.
- Make it work for other prefixes such as
!
.
Links / references
Documentation blurb
Overview
What is it?
Search by issue id for super-quick access.
Why should someone use this feature?
Someone is handed an issue id via side channels such as over the phone, during meetings, referenced in a third-party application, or even via text-based means but without a link.
What is the underlying (business) problem?
Overall useful, but especially so for support teams. Going to a random issue then editing the iid part of the URL gets old quickly.
How do you use this feature?
Type #
in various search boxes that lend themselves to returning issues.
Use cases
- Developers discuss issues in a meeting and need to quickly jump to a couple of issues they know the id of.
- Hallway hailing, someone says: "Hey, gotta go quickly. BTW, can you look at issue 42? See ya!"
- A support team membre has a customer on the phone: "What's your ticket number?", "42".
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