Commit 0533cf60 authored by Max Woolf's avatar Max Woolf Committed by Markus Koller

Remove export_merge_requests_as_csv feature flag

Removes export_merge_requests_as_csv feature flag
from the codebase and associated specs
parent edaca4d4
......@@ -318,8 +318,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
end
def export_csv
return render_404 unless Feature.enabled?(:export_merge_requests_as_csv, project, default_enabled: true)
IssuableExportCsvWorker.perform_async(:merge_request, current_user.id, project.id, finder_options.to_h) # rubocop:disable CodeReuse/Worker
index_path = project_merge_requests_path(project)
......
- if Feature.enabled?(:export_merge_requests_as_csv, @project, default_enabled: true)
.btn-group
.btn-group
= render 'shared/issuable/csv_export/button', issuable_type: 'merge-requests'
- if @can_bulk_update
......@@ -8,5 +7,4 @@
= link_to new_merge_request_path, class: "gl-button btn btn-success", title: "New merge request" do
New merge request
- if Feature.enabled?(:export_merge_requests_as_csv, @project, default_enabled: true)
= render 'shared/issuable/csv_export/modal', issuable_type: 'merge_requests'
---
name: export_merge_requests_as_csv
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45130
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/267129
type: development
group: group::compliance
default_enabled: true
......@@ -6,23 +6,12 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Export Merge Requests to CSV **(CORE)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3619) in GitLab 13.6.
> - It was [deployed behind a feature flag](../../../administration/feature_flags.md), disabled by default.
> - Became enabled by default in GitLab 13.6.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-export-merge-requests-to-csv). **(CORE ONLY)**
> - It can be enabled or disabled for a single project.
CAUTION: **Warning:**
This feature might not be available to you. Check the **version history** note above for details.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3619) in GitLab 13.6.
Exporting Merge Requests CSV enables you and your team to export all the data collected from merge requests into a comma-separated values (CSV) file, which stores tabular data in plain text.
To export Merge Requests to CSV, navigate to your **Merge Requests** from the sidebar of a project and click **Export to CSV**.
Exported files are generated asynchronously and delivered as an email attachment upon generation.
## CSV Output
The following table shows what attributes will be present in the CSV.
......@@ -54,28 +43,3 @@ The following table shows what attributes will be present in the CSV.
- Export merge requests to CSV is not available at the Group’s merge request list.
- As the merge request CSV file is sent as an email attachment, the size is limited to 15MB to ensure successful delivery across a range of email providers. If you need to minimize the size of the file, you can narrow the search before export. For example, you can set up exports of open and closed merge requests in separate files.
### Enable or disable Export Merge Requests to CSV **(CORE ONLY)**
Export merge requests to CSV is under development but ready for production use.
It is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can opt to disable it.
To enable it:
```ruby
# For the instance
Feature.enable(:export_merge_requests_as_csv)
# For a single project
Feature.enable(:export_merge_requests_as_csv, Project.find(<project id>))
```
To disable it:
```ruby
# For the instance
Feature.disable(:export_merge_requests_as_csv)
# For a single project
Feature.disable(:export_merge_requests_as_csv, Project.find(<project id>))
```
......@@ -1998,10 +1998,6 @@ RSpec.describe Projects::MergeRequestsController do
describe 'POST export_csv' do
subject { post :export_csv, params: { namespace_id: project.namespace, project_id: project } }
before do
stub_feature_flags(export_merge_requests_as_csv: project)
end
it 'redirects to the merge request index' do
subject
......@@ -2014,17 +2010,5 @@ RSpec.describe Projects::MergeRequestsController do
subject
end
context 'feature is disabled' do
before do
stub_feature_flags(export_merge_requests_as_csv: false)
end
it 'expects a 404 response' do
subject
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
end
......@@ -9,24 +9,10 @@ RSpec.describe 'Merge Requests > Exports as CSV', :js do
before do
sign_in(user)
end
subject { page.find('.nav-controls') }
context 'feature is not enabled' do
before do
stub_feature_flags(export_merge_requests_as_csv: false)
visit(project_merge_requests_path(project))
end
it { is_expected.not_to have_button('Export as CSV') }
end
context 'feature is enabled for a project' do
before do
stub_feature_flags(export_merge_requests_as_csv: project)
visit(project_merge_requests_path(project))
end
subject { page.find('.nav-controls') }
it { is_expected.to have_button('Export as CSV') }
......@@ -42,5 +28,4 @@ RSpec.describe 'Merge Requests > Exports as CSV', :js do
expect(page).to have_content "It will be emailed to #{user.email} when complete"
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment