Add support for epics in GLQL

What does this MR do and why?

Add support for epics in GLQL

Add support for querying epics type = Epic) and querying issues by epic (epic = gitlab-org&1) in GLQL.

Legacy epics only support querying by a single epic (epic = gitlab-org&1) But work items support multiple epics (epic in (gitlab-org&1, gitlab-org&2, &3)).

References

Screenshots or screen recordings

Screenshots for the output of a GLQL query largely remain unchanged. However, we can now execute the following queries:

With the legacy epics API

epic = 123 # Epic ID can be a number
epic = &123 # Reference, without a group prefix
epic = gitlab-org&123 # Reference with a group prefix
epic = "123" # Quoted number
epic = "&123" # Quoted reference without a group prefix
epic = "gitlab-org&123" # Quoted reference with a group prefix

type = Epic # List all epics only. Cannot be combined with issues. Example: `type in (Epic, Issue)` - NOT ALLOWED

With the new work items API

If you enable feature flag glql_work_items, the epic query also supports the IN operator with any of the variants defined above:

epic in (123, 456) 
epic in (&456, "123", gitlab-org&1, gitlab-com&2) # Any combination is allowed

type in (Epic, Issue) # ALLOWED!

How to set up and validate locally

  1. Add an epic to one or more issues.
  2. Try any of the GLQL queries above.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Himanshu Kapoor

Merge request reports

Loading
Loading