Commit 6a645a3b authored by Alper Akgun's avatar Alper Akgun

Merge branch '321785-deprecate-group-level-merge-request-analytics-metrics' into 'master'

Mark group-level MR Analytics metrics as removed

See merge request gitlab-org/gitlab!60175
parents 6018947d 679658da
...@@ -6,7 +6,7 @@ product_stage: manage ...@@ -6,7 +6,7 @@ product_stage: manage
product_group: group::optimize product_group: group::optimize
product_category: product_category:
value_type: number value_type: number
status: data_available status: removed
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
distribution: distribution:
......
...@@ -6,8 +6,9 @@ product_stage: manage ...@@ -6,8 +6,9 @@ product_stage: manage
product_group: group::optimize product_group: group::optimize
product_category: product_category:
value_type: number value_type: number
status: data_available status: removed
time_frame: all time_frame: 7d
data_source: redis_hll
data_source: data_source:
distribution: distribution:
- ce - ce
......
...@@ -114,7 +114,7 @@ Unique visitors to /groups/:group/-/analytics/merge_request_analytics ...@@ -114,7 +114,7 @@ Unique visitors to /groups/:group/-/analytics/merge_request_analytics
Group: `group::optimize` Group: `group::optimize`
Status: `data_available` Status: `removed`
Tiers: `free` Tiers: `free`
...@@ -7410,7 +7410,7 @@ Missing description ...@@ -7410,7 +7410,7 @@ Missing description
Group: `group::optimize` Group: `group::optimize`
Status: `data_available` Status: `removed`
Tiers: `free` Tiers: `free`
...@@ -7422,7 +7422,7 @@ Missing description ...@@ -7422,7 +7422,7 @@ Missing description
Group: `group::optimize` Group: `group::optimize`
Status: `data_available` Status: `removed`
Tiers: Tiers:
......
# frozen_string_literal: true
class Groups::Analytics::MergeRequestAnalyticsController < Groups::Analytics::ApplicationController
include Analytics::UniqueVisitsHelper
layout 'group'
before_action :load_group
before_action -> {
check_feature_availability!(:group_merge_request_analytics)
}
before_action -> {
authorize_view_by_action!(:read_group_merge_request_analytics)
}
track_unique_visits :show, target_id: 'g_analytics_merge_request'
def show
end
end
---
title: Mark 3 group-level Merge Request Analytics metrics as removed
merge_request: 60175
author:
type: deprecated
...@@ -6,7 +6,7 @@ product_stage: manage ...@@ -6,7 +6,7 @@ product_stage: manage
product_group: group::optimize product_group: group::optimize
product_category: product_category:
value_type: number value_type: number
status: data_available status: removed
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
distribution: distribution:
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Groups::Analytics::MergeRequestAnalyticsController do
let_it_be(:current_user) { create(:user) }
let_it_be(:group) { create :group }
let_it_be(:feature_name) { :group_merge_request_analytics }
before do
sign_in(current_user)
stub_licensed_features(feature_name => true)
end
describe 'GET #show' do
subject { get :show, params: { group_id: group } }
before do
group.add_maintainer(current_user)
end
it { is_expected.to be_successful }
it_behaves_like 'tracking unique visits', :show do
let(:request_params) { { group_id: group } }
let(:target_id) { 'g_analytics_merge_request' }
end
context 'when license is missing' do
before do
stub_licensed_features(feature_name => false)
end
it { is_expected.to have_gitlab_http_status(:forbidden) }
end
context 'when the user has no access to the group' do
before do
current_user.group_members.delete_all
end
it { is_expected.to have_gitlab_http_status(:forbidden) }
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