Return results if project archived for issues
What does this MR do and why?
Add the condition that the search scope is project
then don't add the archive filter.
There is no need to add specs for this change. There is a shared example spec for checking if the archived filter is added. This change will not add the archived filter to the project search for the archived project. Looks like there was no spec for an archived filter for archived project searches so there is nothing to remove in specs.
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
- Ensure the elasticsearch is enabled
- Enable the feature flag
search_issues_hide_archived_projects
Feature.enable :search_issues_hide_archived_projects
- Archive the project where you want to do the project search.
- Wait a little to ensure that the Sidekiq job to update the
archived
field is completed. - Now perform a project advanced search on the archived project as a non-admin user
- You should see the results for issues
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #420906 (closed)
Edited by Ravi Kumar