Skip to content

Update the wiki query to exclude archived

What does this MR do and why?

This MR hides the wikis from the archived projects in the advanced group searches. It is backed by the feature flag search_project_wikis_hide_archived_projects which can accept user as an actor. If the query param include_archived=true is passed, then the results will also contain the milestones from the archived projects.

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

  • Make sure the advanced search is enabled.
  • Create some wikis in a group.
  • Create some wikis in a project under the previously selected group.
  • Create some wikis in another project under the previously selected group.
  • Make sure all wikis have some common keyword that will be used to perform search queries.
  • Now archive one of the two projects.
  • Now disable the feature_flag search_project_wikis_hide_archived_projects
Feature.disable :search_project_wikis_hide_archived_projects
  • Now search for some keyword that exists in all the previously created wikis.
  • You should see the wikis from the archived project, unarchived project, and the group.
  • Now add include_archived=true as a query param in the URL
  • You should see the wikis from the archived project, unarchived project, and the group.
  • Now enable the feature_flag
Feature.enable :search_project_wikis_hide_archived_projects
  • Now search for some keyword that exists in all the previously created wikis.
  • You should see the wikis from the unarchived project, and the group only.
  • Now perform a project search on an archived project
  • You should see the wikis in the search results.

MR acceptance checklist

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

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 #416248 (closed)

Related to #417744 (closed)

Edited by Ravi Kumar

Merge request reports

Loading