Skip to content

Update search query to hide archived notes

What does this MR do and why?

This MR updates the search query for notes to discard the notes from the archived projects. This is backed by a feature flag search_notes_hide_archived_projects. If the feature flag is enabled then only the notes from the archived projects will be rejected. Also, this new feature will be effective only if the migration backfill_archived_on_notes is completed. And at last, if there is an option param include_archived then it will always include the results from the archived projects. This param implementation include_archived will come up in the follow up issues.

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

For basic search:

  • Disable the Advanced search
  • Create a note with some specific keyword like qwerty on any project's entity like issues/merge requests
  • Create a note with some specific keyword like qwerty on any second project's entity like issues/merge requests.
  • Now search for qwerty. You should see the results from both projects
  • Now enable the feature-flag search_notes_hide_archived_projects
Feature.enable :search_notes_hide_archived_projects
  • Now search again, you should see the results from only non-archived project

For advanced search:

  • Enable the advanced search and repeat the process. You can skip the steps to create the notes because you already did before

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #414905 (closed)

Related to Update the search query to exclude the archived (#419101 - closed)

Edited by Ravi Kumar

Merge request reports

Loading