Skip to content

Add an option to list only archived projects

Mehdi Lahmam requested to merge mehlah/gitlab-ce:archived-projects-only into master

What does this MR do?

It adds an option to list only archived projects.
Motivations are explained at #35994 (closed)

Screenshots

Screen_Shot_2017-08-17_at_10.24.49

Admin section

Screen_Shot_2017-08-17_at_10.25.20

Are there points in the code the reviewer needs to double check?

I introduced a params[:archived] == 'only' value but I'm realizing looking at code comments and specs that params[:archived] has been deprecated in favor of params[:non_archived], but this change isn't reflected in admin controllers.
It still should be deprecated or can we handle both :archived and :non_archived options?
To me, params[:non_archived] = params[:archived].blank? is enough to infer one from the other in ProjectsFinder and support both.

Also, this filtering option seemed (regarding the issue description) useful mostly for admins. I thought first introducing it only for them, but as we share view partials with non-admin, I supported it everywhere.

WDYT?

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#35994 (closed)

Edited by Mehdi Lahmam

Merge request reports