Create an option to archive/unarchive Groups
## Problem
There is an ability to archive a project within a group, but there is no ability to archive an entire group with GitLab today.
If a product is mothballed, the operations team would like to archive the GitLab group (and its projects) so that it no longer appears within the GitLab UI like an active product that is under development.
Currently, the only workaround is to archive each project in a group individually, which can be tedious if the group contains dozens of projects or more.
```mermaid
graph TD;
TopGroup[Top-level Group];
SubGroup1[Subgroup 1];
SubGroup2[Subgroup 2];
SubGroup1A[Subgroup 1A];
SubGroup2A[Subgroup 2A];
TopGroup --> SubGroup1;
TopGroup --> SubGroup2;
SubGroup1 --> SubGroup1A;
SubGroup2 --> SubGroup2A;
SubGroup1 --> Proj1A[P 1A];
SubGroup1 --> Proj1B[P 1B];
SubGroup1 --> Proj1C[P 1C];
SubGroup1 --> Proj1D[P 1D];
SubGroup1 --> Proj1E[P 1E];
SubGroup2 --> Proj2A[P 2A];
SubGroup2 --> Proj2B[P 2B];
SubGroup2 --> Proj2C[P 2C];
SubGroup2 --> Proj2D[P 2D];
SubGroup2 --> Proj2E[P 2E];
SubGroup1A --> Proj1A1[P 1A1];
SubGroup1A --> Proj1A2[P 1A2];
SubGroup1A --> Proj1A3[P 1A3];
SubGroup2A --> Proj2A1[P 2A1];
SubGroup2A --> Proj2A2[P 2A2];
SubGroup2A --> Proj2A3[P 2A3];
classDef group fill:#fff,stroke:#333,stroke-width:2px;
classDef project fill:#fff,stroke:#333;
class TopGroup,SubGroup1,SubGroup2,SubGroup1A,SubGroup2A group;
class Proj1A,Proj1B,Proj1C,Proj1D,Proj1E,Proj2A,Proj2B,Proj2C,Proj2D,Proj2E,Proj1A1,Proj1A2,Proj1A3,Proj2A1,Proj2A2,Proj2A3 project;
```
In the example above, this means that:
1. A user who wants to archive the entire content of `Subgroup 2A` needs to archive the projects `P 2A1`, `P 2A2` and `P 2A3` individually. Instead of 1 action, 3 different actions are necessary.
2. A user who wants to archive the entire content of `Subgroup 2` needs to archive the projects `P 2A1`, `P 2A2`, `P 2A3`, `P 2A`, `P 2B`, `P 2C`, `P 2D`, and `P 2E` individually. Instead of 1 action, 8 different actions are necessary.
3. The groups remain active and searchable, meaning that they will appear in search results even though they are no longer relevant.
By introducing group archiving, the burden on users to archive projects individually can be reduced from N+1 to 1 action. For case (1), this would mean that 1 action at the level of `Subgroup 2A` needs to be taken that will automatically archive `Subgroup 2A`, `P 2A1`, `P 2A2` and `P 2A3`:
```mermaid
graph TD;
TopGroup[Top-level Group];
SubGroup1[Subgroup 1];
SubGroup2[Subgroup 2];
SubGroup1A[Subgroup 1A];
SubGroup2A[Subgroup 2A];
TopGroup --> SubGroup1;
TopGroup --> SubGroup2;
SubGroup1 --> SubGroup1A;
SubGroup2 --> SubGroup2A;
SubGroup1 --> Proj1A[P 1A];
SubGroup1 --> Proj1B[P 1B];
SubGroup1 --> Proj1C[P 1C];
SubGroup1 --> Proj1D[P 1D];
SubGroup1 --> Proj1E[P 1E];
SubGroup2 --> Proj2A[P 2A];
SubGroup2 --> Proj2B[P 2B];
SubGroup2 --> Proj2C[P 2C];
SubGroup2 --> Proj2D[P 2D];
SubGroup2 --> Proj2E[P 2E];
SubGroup1A --> Proj1A1[P 1A1];
SubGroup1A --> Proj1A2[P 1A2];
SubGroup1A --> Proj1A3[P 1A3];
SubGroup2A --> Proj2A1[P 2A1];
SubGroup2A --> Proj2A2[P 2A2];
SubGroup2A --> Proj2A3[P 2A3];
classDef group fill:#fff,stroke:#333,stroke-width:2px;
classDef grouparchived fill:#82f,stroke:#999,stroke-width:2px;
classDef project fill:#fff,stroke:#333;
classDef projectarchived fill:#82f,stroke:#999;
class TopGroup,SubGroup1,SubGroup2,SubGroup1A group;
class SubGroup2A grouparchived;
class Proj1A,Proj1B,Proj1C,Proj1D,Proj1E,Proj2A,Proj2B,Proj2C,Proj2D,Proj2E,Proj1A1,Proj1A2,Proj1A3,Proj2A1,Proj2A2,Proj2A3 project;
class Proj2A1,Proj2A2,Proj2A3 projectarchived;
```
For case (2), this would mean that 1 action at the level of `Subgroup 2` needs to be taken that will automatically archive `Subgroup 2A`, `P 2A1`, `P 2A2`, `P 2A3`, `P 2A`, `P 2B`, `P 2C`, `P 2D`, and `P 2E`:
```mermaid
graph TD;
TopGroup[Top-level Group];
SubGroup1[Subgroup 1];
SubGroup2[Subgroup 2];
SubGroup1A[Subgroup 1A];
SubGroup2A[Subgroup 2A];
TopGroup --> SubGroup1;
TopGroup --> SubGroup2;
SubGroup1 --> SubGroup1A;
SubGroup2 --> SubGroup2A;
SubGroup1 --> Proj1A[P 1A];
SubGroup1 --> Proj1B[P 1B];
SubGroup1 --> Proj1C[P 1C];
SubGroup1 --> Proj1D[P 1D];
SubGroup1 --> Proj1E[P 1E];
SubGroup2 --> Proj2A[P 2A];
SubGroup2 --> Proj2B[P 2B];
SubGroup2 --> Proj2C[P 2C];
SubGroup2 --> Proj2D[P 2D];
SubGroup2 --> Proj2E[P 2E];
SubGroup1A --> Proj1A1[P 1A1];
SubGroup1A --> Proj1A2[P 1A2];
SubGroup1A --> Proj1A3[P 1A3];
SubGroup2A --> Proj2A1[P 2A1];
SubGroup2A --> Proj2A2[P 2A2];
SubGroup2A --> Proj2A3[P 2A3];
classDef group fill:#fff,stroke:#333,stroke-width:2px;
classDef grouparchived fill:#82f,stroke:#999,stroke-width:2px;
classDef project fill:#fff,stroke:#333;
classDef projectarchived fill:#82f,stroke:#999;
class TopGroup,SubGroup1,SubGroup1A group;
class SubGroup2,SubGroup2A grouparchived;
class Proj1A,Proj1B,Proj1C,Proj1D,Proj1E,Proj1A1,Proj1A2,Proj1A3,Proj2A1,Proj2A2,Proj2A3 project;
class Proj2A,Proj2B,Proj2C,Proj2D,Proj2E,Proj2A1,Proj2A2,Proj2A3 projectarchived;
```
At the same time, search will deliver more focused results by separating inactive groups from active content.
## Proposal
Add an option to "Archive group" to the "Edit Group" screen in GitLab.
1. To archive a group, locate a group, click on `Edit` and select `Archive group`. Messaging should follow a similar message as used when archiving projects: 
2. Archived groups display a message on the group overview page similar as is displayed for projects:  Subgroups and projects of the archived group should display this message as well.
3. To unarchive a group, locate the group, click on `Edit` and select `Unarchive group`. Messaging should follow a similar messages as used when unarchiving projects: 
4. When archived, a group and its contents will be shown in the `Inactive` tab in Group listings (e.g. Group overview page, Your Work, Explore). Reference: design vision for [Explore](https://gitlab.com/groups/gitlab-org/-/epics/555#design-vision) and [Your Work](https://gitlab.com/groups/gitlab-org/-/epics/12280#design-vision). 
5. When archived, a group and its contents can be unarchived by a group Owner or admin by locating the group, clicking `Edit` and selecting `Unarchive`
6. When archiving a group, all of its subgroups and projects get archived as well
- A subgroup of an archived group cannot be unarchived. The archived group needs to be unarchived in its entirety.
- An archived group cannot be transferred.
7. When archived, groups show the `Archived` badge in lists
- All subgroups and projects of the group display the `Archived` badge in lists as well
8. When archived, issue status remains unchanged. Open issues remain open, and closed issues remain closed.
## Designs
See https://gitlab.com/gitlab-org/gitlab/-/issues/472805.
In groups/projects settings \> general\> advanced add/modify the archive setting as follows:
- [x] Add option archive group
- [x] Add option to unarchive group
- [x] Modify option to unarchive projects that are children of archived groups
- [x] Modify option to unarchive groups that are children of archived groups

In groups/projects that are archived or children of archived groups add/modify a non-dismisable alert on all pages as follows:
- [x] Add alert to groups that archived
- [x] Add alert to projects that are children of archived groups
- [x] Modify archived projects that were archived and are now children of archived groups
- [x] Add alert to groups that are children of archived groups

Add/Modify tabs to the following pages to account for active and inactive groups
- [ ] Your work groups
- [ ] Modify Group overview (homepage) Inactive tab to include groups and projects
{width="491" height="320"}
## Requirements
See https://gitlab.com/gitlab-org/gitlab/-/issues/382051.
## Backend effort
- [x] Add column for setting
- [x] Create the setting, and expose it on the API to be checked/unchecked
- [x] When the setting is checked, everything in the group and it's hierarchy should be archived
- [x] Edits of any kind to subgroups or projects should not work
- [x] Transfer should not work
- [x] A subgroup or project cannot be independently unarchived
- [x] When unchecked, everything in the group and it's hierarchy should be unarchived.
- [x] When the setting is checked, appropriate alerts should be shown
- [x] When the setting is checked, appropriate badges should be shown
- [x] Only group Owners should be able to archive/unarchive a group
- [x] Admins should be able to archive/unarchive a group on behalf of a group Owner
- [x] API endpoints should be rate limited
## Value Analysis: Group Archiving Functionality
Group archiving addresses a clear, frequently mentioned pain point across customers of different sizes and industries. It provides significant time savings and organizational benefits to customers while potentially increasing adoption, satisfaction, and tier upgrades for GitLab's business.
The feature aligns well with GitLab's strategy of streamlining DevOps workflows and would provide particularly strong value to enterprise customers who manage complex hierarchical structures with many projects and subgroups.
## Customer Value
### Time Savings and Operational Efficiency
- Reducing administrative overhead: Instead of N+1 actions to archive projects individually, users need just 1 action to archive an entire group hierarchy
- For a group with 8 projects (like `Subgroup 2` in the example), this reduces manual work by ~87.5%
- For larger organizations with hundreds or thousands of projects, the time savings become substantial
### Improved Organization and Searchability
- 1/3 of interviewees explicitly mentioned challenges with archiving groups
- One customer stated they "currently have to manually move groups to an '_archive' group and remove permissions"
- Another customer mentioned difficulty maintaining clear organization of completed projects
- Improved search results by filtering out inactive content will address the pain point
### Alignment with Customer Workflow
- Customers already mentally model inactive groups as "archived" but lack the technical capability to implement this
- Current workarounds (moving to "_archive" folders, manually archiving each project) are inefficient
## Business Value
### Customer Retention and Satisfaction
- The feature directly addresses feedback from at least 7 different customer interviews spanning various industries. This is also the highest upvoted issue in the domain of ~"group::organizations"
- May reduce support costs related to helping customers manage inactive projects/groups
- Fills a gap in GitLab's offering compared to alternative solutions that may offer better group management
### Enterprise Customer Expansion
- Especially valuable for large enterprise customers who manage complex hierarchies
## Quantification of Value
While exact ROI is difficult to calculate, we can make reasonable estimates based on the interview data:
1. **Time Savings**: If we assume:
- Average time to archive a single project: 1 minute
- Average number of projects per group: 10 (conservative estimate)
- Number of groups archived per month per company: 5
- Number of affected companies: ~50% of premium/ultimate customers
This translates to savings of approximately 45 minutes per month per company (5 minutes vs. 50 minutes), or 9 hours per year per company. The larger the number of projects in a group, the larger the time savings.
2. **User Experience Improvement**:
- Based on the interviews, approximately 30-40% of customers are affected by this limitation
- For large enterprises this could be affecting thousands of users
epic