Skip to content

Make searching issues/MRs by IID even easier/more discoverable

Dylan Griffith requested to merge search-issue-and-mr-id into master

What does this MR do?

Prior to this change you were required to prepend your search with # or ! (like an Issue/MR link) to trigger the search by IID behaviour. This changes things so that it's even simpler to search by IID. As long as the input is just a number we'll ensure that the IID field is included in search query. This also won't prevent you from searching for the number as part of an issue title or description since we also query those fields but we give higher weight to the IID so exact IID matches should appear as the first result.

This should make the searching a bit more approachable/serendipitous since it should "just work".

This MR also includes some refactoring to improve the tests. Specifically some of the tests for searching by IID were passing by accident before. It also refactors them to use contain_exactly since this makes them more concise.

I opted not to add any docs for this change since the existing feature of searching by IID doesn't seem to be documented and in general it doesn't seem like there is actually a good place to document that you can search for a number that would actually add any value. If someone has a good suggestion of where to put the docs and how to present that in a useful way I'd happily add them.

Screenshots

Screen_Shot_2020-08-26_at_3.02.12_pm

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

#241264

Edited by Dylan Griffith

Merge request reports