Epic search in issues inconsistent

Problem

When searching for an epic in the Epic field of an Issue, the search results are unexpected. See original description or #277065 (comment 442556119) for examples.

Suggested solution

Backend

  • Implement searchInput and searchFields in GraphQL queries for listing epics in a group, to allow partial string searches by a defined set of fields

Frontend

  • Update the frontend request to use GraphQL.

Original description

Summary

When searching for an epic in the Epic field of an Issue, the search results are unexpected.

Examples

Use-case 1: Searching for Epic "Improve Current Translations"

image

^^^ I expected that my epic would already show up here, given that it starts with the exact word “Improve”. However, even if I scroll to the end of the suggested values, my epic is not there.

I also don’t quite get the ordering of the suggested results. It’s not alphabetic, but I don’t know what it is.

image

^^^ As I continue typing and type out two full words, no matches are found.

image

^^^ Starting the last word, still no matches.

image

^^^ One more character and now I finally see my epic.

Use-case 2: Searching for Epic "Project Export/Import"

image

^^^ I expect that typing "project export" would find a match.

image

^^^ Adding a slash "/" does the trick.

Use-case 3: Searching for Epic "Github Importer"

image

^^^ No results for "github", even though there should be several.

image

^^^ Continuing to type, two results appear. There should be more and it feels random that only two are shown. (Why these two?)

image

^^^ After typing two full words "github importer", all the epics are found. However, I can't tell the full name of the last choice, as it is cut off. I think that I should be able to see all the choices presented, given that there is a scrollbar inside the search field.

Also, it feels odd that as I type more, more results are found. I would expect the opposite experience - if I type one word, many choices are shown and as I type more, those choices are narrowed. Having the inverse experience is confusing.

Proposals

First iteration:

  • Implement the in parameter in the EpicsFinder in the same way as the general IssuableFinder;
  • Expose the in parameter in the REST API; then
  • Add &in=title to the query on the frontend.

Later:

  • Implement searchInput and searchFields in GraphQL queries for listing epics in a group, to allow partial string searches by a defined set of fields; and
  • Update the frontend request to use GraphQL.
Edited by Jarka Košanová