Advanced search - allow queries for milestone in work item index
What does this MR do and why?
This MR introduces support for the following GLQL milestone queries:
Single Milestone Queries
| GLQL Query | WorkItems Finder | ES Filter Name |
|---|---|---|
milestone = %"18.1" |
milestone_title: ["18.1"] |
milestone_title |
milestone != %"18.1" |
not: {milestone_title: ["18.1"]} |
not_milestone_title |
Multiple Milestone Queries (OR Logic)
| GLQL Query | WorkItems Finder | ES Filter Name |
|---|---|---|
milestone in (%"18.1", %"18.2") |
milestone_title: ["18.1", "18.2"] |
milestone_title |
milestone != (%"18.1", %"18.2") |
not: {milestone_title: ["18.1", "18.2"]} |
not_milestone_title |
Wildcard Milestone Queries
| GLQL Query | WorkItems Finder | ES Filter Name |
|---|---|---|
milestone = none |
milestone_wildcard_id: "NONE" |
none_milestone_title |
milestone != any |
milestone_wildcard_id: "NONE" |
none_milestone_title |
milestone = any |
milestone_wildcard_id: "ANY" |
any_milestone_title |
milestone != none |
milestone_wildcard_id: "ANY" |
any_milestone_title |
started and upcoming scopes now.
This will be done in a follow up issue #547410 (closed).
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Follow this guide to have ES enabled locally for GDK
- GLQL relies on
crypto.subtle, which is unavailable in insecure contexts (except forlocalhost), it won’t work if you're using a custom URL likehttp://gdk.test:3000locally. To resolve this, one of the options is to enable HTTPS in GDK by following this link. - Enable the following two feature flags in
rails c:
=> Feature.enable(:glql_integration)
=> Feature.enable(:glql_work_items)
- Navigate to any issue comment or description field where Markdown is supported
- Add the following GLQL query into the field:
```glql
display: table
fields: title, labels("workflow::*"), author, labels
query: group = "gitlab-org" and milestone = %"18.1"
```
- Test with different
milestonefields variations provided above in the MR description section.
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.
Related to #526608 (closed)
Edited by Alisa Frunza