Exclude archived projects in search results by default
What does this MR do and why?
Users have been requesting to exclude archived projects from the search results for the project scope.
How
- Add a filter
include_archived
- added to CE since both basic and advanced search will use it - Exclude archived projects if the filter is not added as a parameter
- Include archived projects if the filter is added as a parameter
- Basic search uses the
archived
field on projects - Advanced search searches use the
archived
field already present in Elasticsearch
Next steps
- Document the default behaviour and how to include archived projects using the parameter
- Frontend: [Projects] Add a visual toggle for including ar... (#413237 - closed)
- API parity: Update projects search API to filter by archive... (#413239)
Screenshots or screen recordings
Type | Level | Before | After | include_archived=true |
---|---|---|---|---|
Basic | Global | |||
Basic | Group | |||
Advanced | Global | |||
Advanced | Group |
How to set up and validate locally
- Do a basic search (add
&basic_search=true
to the url) for an existing project and verify that the project is returned in search results- Without selecting a group/project
- With a group selected
- Archive the project
- Do the same basic searches and verify that the project is not returned
- Unarchive the project
- Do an advanced search (make sure Elasticsearch is setup) for the project and verify that the project is returned
- Without selecting a group/project
- With a group selected
- Archive the project
- Do the same advanced searches and verify that the project is not returned
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 #18262 (closed)
Edited by Madelein van Niekerk