Remove archive_group feature flag check on the projects archive settings
Based on our decision in #561661 (comment 2711591938), we will implement the feature flag to control only the group archiving functionality, while unarchiving will always be available regardless of feature flag status. This means:
- When the feature flag is disabled, previously archived groups will remain archived.
- We can use the new archive settings UI in the project settings page directly.
- We don't need to hide the functionality that supports inherited group archive status.
Implementation Guide
- Apply the following patch:
Index: app/views/projects/settings/_archive.html.haml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml
--- a/app/views/projects/settings/_archive.html.haml (revision 2e0e9f18897779f027d91b7a36393a095dcf3c0b)
+++ b/app/views/projects/settings/_archive.html.haml (date 1755495380941)
@@ -1,28 +1,6 @@
- return unless archiving_available?(project)
-- if Feature.enabled?(:archive_group, project.root_ancestor)
- - if project.self_or_ancestors_archived?
- #js-unarchive-settings{ data: project_unarchive_settings_app_data(project) }
- - else
- #js-archive-settings{ data: project_archive_settings_app_data(project) }
+- if project.self_or_ancestors_archived?
+ #js-unarchive-settings{ data: project_unarchive_settings_app_data(project) }
- else
- = render Pajamas::CardComponent.new do |c|
- - c.with_header do
- .gl-flex.gl-grow
- %h4.gl-text-base.gl-leading-24.gl-m-0
- - if project.archived?
- = _('Unarchive project')
- - else
- = _('Archive project')
-
- - c.with_body do
- - if project.archived?
- - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/working_with_projects.md', anchor: 'unarchive-a-project') }
- %p= _("Unarchiving the project restores its members' ability to make commits, and create issues, comments, and other entities. %{strong_start}After you unarchive the project, it displays in the search and on the dashboard.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: link_start, link_end: '</a>'.html_safe }
- = render Pajamas::ButtonComponent.new(method: :post, href: unarchive_project_path(project), variant: :confirm, button_options: { aria: { label: _('Unarchive project') }, data: { confirm: _("Are you sure that you want to unarchive this project?"), testid: 'unarchive-project-link' } }) do
- = _('Unarchive project')
- - else
- - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/working_with_projects.md', anchor: 'archive-a-project') }
- %p= _("Archiving the project makes it entirely read-only. It is hidden from the dashboard and doesn't display in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: link_start, link_end: '</a>'.html_safe }
- = render Pajamas::ButtonComponent.new(method: :post, href: archive_project_path(project), variant: :confirm, button_options: { aria: { label: _('Archive project') }, data: { confirm: _("Are you sure that you want to archive this project?"), testid: 'archive-project-link', 'confirm-btn-variant': 'confirm' } }) do
- = _('Archive project')
+ #js-archive-settings{ data: project_archive_settings_app_data(project) }
\ No newline at end of file
- Update affected tests.
Edited by Shane Maglangit