Advanced search - allow queries for milestone in work item index
Problem to solve
We're working on a proof of concept for GLQL to hook into advanced search. The two most important fields are milestone (not present) and labels (present). Both fields are needed to do the proof of concept
https://docs.gitlab.com/user/glql/fields/#milestone
Important
Filtering by started, not_started, upcoming and not_upcoming is out of the scope if this issue because we do not have all the necessary fields for these queries in the work items index (see related issue #540792 (closed)). This will be implemented in a separate issue.
Proposal
This work is blocked by #525883 (closed) which adds milestone_title data to the work item index and backfills it.
Support querying by milestone for work items.
It must support =, in, != operations to mimic GLQL as well as the supported input types:
- milestone (example
%Backlog,%"Awaiting Further Demand") - array (example
(%17.7, %17.8)) - string (example:
(will be done in a separate issue),upcoming,startednone,any)
Add to the query builder
- Add a new filter to
Search::Elastic::Filterscalledby_milestone. Atermsquery in combination withboolquery can allow=/into be served bymilestoneparam and!=to be served bynot_milestone - Add the new filter to the `WorkItemQueryBuilder
Expose to search service (TBD if needed)
- Add a two new params called
milestoneandnot_milestoneto the filters inEE::Search::Filterconcern