Commit 3910bac9 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '194165-remove-code-reivew-analytics-feature-flag' into 'master'

Remove Code Review Analytics feature flag

Closes #194165

See merge request gitlab-org/gitlab!23418
parents e4bbe03c eb9a1a27
......@@ -47,13 +47,3 @@ and trends between them. For example:
- On [Starter or Bronze tier](https://about.gitlab.com/pricing/) and above.
- By users with Reporter access and above.
## Disable with feature flag
Code Review Analytics is [currently enabled by a feature flag](https://gitlab.com/gitlab-org/gitlab/issues/194165)
that defaults to ON, meaning the feature is available. If you experience performance problems or
otherwise wish to disable the feature, a GitLab administrator can execute a command in a Rails console:
```ruby
Feature.disable(:code_review_analytics)
```
......@@ -15,8 +15,7 @@ Once enabled, click on **Analytics** from the top navigation bar.
From the centralized analytics workspace, the following analytics are available:
- [Code Review Analytics](code_review_analytics.md), enabled with the `code_review_analytics`
[feature flag](../../development/feature_flags/development.md#enabling-a-feature-flag-in-development). **(STARTER)**
- [Code Review Analytics](code_review_analytics.md). **(STARTER)**
- [Cycle Analytics](cycle_analytics.md), enabled with the `cycle_analytics`
[feature flag](../../development/feature_flags/development.md#enabling-a-feature-flag-in-development). **(PREMIUM)**
- [Productivity Analytics](productivity_analytics.md), enabled with the `productivity_analytics`
......
......@@ -59,7 +59,7 @@ module EE
nav_tabs << :packages
end
if ::Feature.enabled?(:code_review_analytics, project, default_enabled: true)
if can?(current_user, :read_code_review_analytics, project)
nav_tabs << :code_review
end
......
- if Feature.enabled?(:code_review_analytics, default_enabled: true) && can?(current_user, :read_code_review_analytics, @project)
- if can?(current_user, :read_code_review_analytics, @project)
- project_analytics_link = project_analytics_code_reviews_path(@project)
= nav_link controller: :code_review do
......
---
title: Remove Code Review Analytics feature flag
merge_request: 23418
author:
type: changed
......@@ -79,9 +79,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources :audit_events, only: [:index]
namespace :analytics do
constraints(::Constraints::FeatureConstrainer.new(:code_review_analytics, default_enabled: true)) do
resources :code_reviews, only: [:index]
end
resources :code_reviews, only: [:index]
end
draw :merge_requests_ee
......
......@@ -28,10 +28,6 @@ module API
end
end
before do
not_found! unless Feature.enabled?(:code_review_analytics, default_enabled: true)
end
resource :analytics do
desc 'List code review information about project' do
end
......
......@@ -14,28 +14,22 @@ describe 'CodeReviewAnalytics', :js do
project.add_reporter(user)
sign_in(user)
end
context 'when the feature is enabled' do
before do
stub_feature_flags(code_review_analytics: true)
visit project_analytics_code_reviews_path(project)
end
visit project_analytics_code_reviews_path(project)
end
it 'renders the filtered search bar correctly' do
page.within('.content-wrapper .content .issues-filters') do
expect(page).to have_css('.filtered-search-box')
end
it 'renders the filtered search bar correctly' do
page.within('.content-wrapper .content .issues-filters') do
expect(page).to have_css('.filtered-search-box')
end
end
it 'displays label and milestone in search hint' do
filtered_search.click
it 'displays label and milestone in search hint' do
filtered_search.click
page.within('#js-dropdown-hint') do
expect(page).to have_content('Label')
expect(page).to have_content('Milestone')
end
page.within('#js-dropdown-hint') do
expect(page).to have_content('Label')
expect(page).to have_content('Milestone')
end
end
end
......@@ -56,18 +56,6 @@ describe API::Analytics::CodeReviewAnalytics do
end
end
context 'when feature is disabled' do
before do
stub_feature_flags(code_review_analytics: false)
end
it 'is not found' do
api_call
expect(response).to have_gitlab_http_status(:not_found)
end
end
context 'when user has no authorization' do
let(:current_user) { guest }
......
......@@ -8,7 +8,6 @@ describe Projects::Analytics::CodeReviewsController, type: :request do
before do
login_as user
stub_feature_flags(code_review_analytics: true)
end
describe 'GET /*namespace_id/:project_id/analytics/code_reviews' do
......
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