Skip to content

Add changes for work items to respect limited indexing for projects

What does this MR do and why?

Advanced search can be limited by namespace or project. WorkItems need to be indexed if the associated group or project is allowed to use advanced search in this MR we are addressing the projects part of the change. It is a followup of !161047 (merged)

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable the limited indexing setting (Go to admin/application_settings/advanced_search) and then look for Elasticsearch indexing restrictions
  2. Add a project to limited setting, you can verify the project is present by running ::Gitlab::CurrentSettings.elasticsearch_limited_projects in the console
  3. Notice the work items are getting indexed in elasticsearch.
  4. Similarly remove project from limiting setting and notice it deletes work items from index.

Related to #473451

Merge request reports