Subscribe to the GroupArchivedEvent Advanced Search
What does this MR do and why?
This change improves how the system handles archived projects and groups in search functionality. Previously, the code only checked if individual projects were archived, but now it also checks if any parent groups are archived - meaning if a parent group is archived, all projects within it should be treated as archived too.
The main updates include:
- Modified search results to use a new method that checks both the project and its parent groups for archived status
- Added performance optimizations to reduce database queries when checking archive status
- Created a new background worker that automatically updates search indexes when groups are archived
- Updated various search-related components (issues, merge requests, milestones, notes) to use the improved archive checking
- Added proper data preloading to avoid performance issues when checking multiple levels of group hierarchy
This ensures that when users search for content, they won't see results from projects that are effectively archived due to their parent groups being archived, providing more accurate and relevant search results while maintaining good performance.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Create a group with a project inside
- Perform an advanced search under a group.
- Archive the group
- Perform again an advanced search under a group. Test the filter
Include archivedin the sidebar is working. Affected scopes are:Issues, Merge Requests, Code, Wiki(only project level, group level wikis will be handled separately), Projects, Commits, Milestones, Comments - Now disable the Advanced search and test the same thing with basic search
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #577187 (closed)