Advanced search - create ES search filters for the remaining GLQL fields

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Description

These are the remaining filters that are now used GLQL that need to be integrated with ES for the complete parity. Please refer to GLQL fields docs for more info no how these fields are used within a query:

  • iteration
  • iteration cadence
  • custom status
  • custom field
  • subscribed
  • emoji reaction
  • title

First, this issue has to implemented to have the data available in ES #540799

Implementation

  1. Create a new search filter for every above GLQL query field, for example, by_iteration, by_custom_field, etc in ee/lib/search/elastic/filters.rb.
  • Depending on what operator the field supports, you might need to implement or_ and not_ filters for such GLQL operators as id in (1, 2) or label != test
  • You might also need to add support for none/any wildcard filters if they are used by GLQL
  1. Change the work item query builder to use the new filter.
  • make sure to gate it by the migration that adds these new fields (for example, ::Elastic::DataMigrationService.migration_has_finished?(:backfill_work_item_milestone_data), we don't want to throw errors in case a field are still being migrated or backfilled
  1. Explicitly allow these new filters in AdvancedFinders::WorkItemsFinder by adding it to either ALLOWED_ES_FILTERS, or NOT_FILTERS, or OR_FILTERS.
  2. Add documentation about the new filter to the list of available filters

Sample MR

Edited by Alisa Frunza