Update API endpoint used for Archived projects
What does this MR do and why?
Related to #371923 (closed)
There is a bug on the Archived projects tab in the group overview where all groups, subgroups and projects are shown regardless of the archived status. This MR updates the API used to fix the bug. For the Archived projects tab we will now use the GET /groups/:id/projects API with the archived parameter. For context on why we decided to switch APIs see #371923 (comment 1090509501)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Go to a group, make note of the group ID
- Open the rails console
bin/rails console
- Run the following commands:
group = Group.find(<group id from step 1>)visibility_levels = [Gitlab::VisibilityLevel::PUBLIC, Gitlab::VisibilityLevel::INTERNAL, Gitlab::VisibilityLevel::PRIVATE]
50.times do |index|
name = FFaker::Lorem.words.join(' ')
FactoryBot.create(
:project_empty_repo,
:archived,
namespace: group,
name: name,
description: FFaker::Lorem.sentence,
path: name.parameterize(separator: '-'),
visibility_level: visibility_levels[index % 3],
ci_project_mirror: Ci::ProjectMirror.first
)
end
- Navigate to the
Archived projectstab on the group overview
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.
Edited by Peter Hegman

