Add fix for indexing work items in limited projects
What does this MR do and why?
When we have limited indexing enabled and we run gitlab:elastic:index
then work items belonging to limited projects only were not getting indexed. This MR is fixing that bug.
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.
- Enable the limited indexing setting (Go to admin/application_settings/advanced_search) and then look for
Elasticsearch indexing restrictions
- Add a project, you can verify the project is present by running
::Gitlab::CurrentSettings.elasticsearch_limited_projects
in the console - Run
gitlab:elastic:index
- Notice the work items are getting indexed in elasticsearch.
Related to #473451 (closed)