Commit 8f71fa99 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '213092-remove-customizable-vsa-ff' into 'master'

Remove VSA feature flags

Closes #213092

See merge request gitlab-org/gitlab!31189
parents aea92e76 8a16e6a7
......@@ -18,9 +18,6 @@ spent in each stage defined in the process.
For information on how to contribute to the development of Value Stream Analytics, see our [contributor documentation](../../development/value_stream_analytics.md).
NOTE: **Note:**
Use the `cycle_analytics` feature flag to enable at the group level.
Value Stream Analytics is useful in order to quickly determine the velocity of a given
project. It points to bottlenecks in the development process, enabling management
to uncover, triage, and identify the root cause of slowdowns in the software development life cycle.
......@@ -33,7 +30,7 @@ calculates a separate median for each stage.
Value Stream Analytics is available:
- From GitLab 12.9, at the group level via **Group > Analytics > Value Stream**. **(PREMIUM)**
- At the project level via **Project > Value Stream Analytics**.
- At the project level via **Project > Analytics > Value Stream**.
There are seven stages that are tracked as part of the Value Stream Analytics calculations.
......@@ -300,15 +297,6 @@ toggled to show data for merge requests and further refined for specific group-l
By default the top group-level labels (max. 10) are pre-selected, with the ability to
select up to a total of 15 labels.
### Disabling chart
This chart is enabled by default. If you have a self-managed instance, an
administrator can open a Rails console and disable it with the following command:
```ruby
Feature.disable(:tasks_by_type_chart)
```
## Permissions
The current permissions on the Project Value Stream Analytics dashboard are:
......@@ -331,14 +319,6 @@ For Value Stream Analytics functionality introduced in GitLab 12.3 and later:
- Features are available only on
[Premium or Silver tiers](https://about.gitlab.com/pricing/) and above.
## Troubleshooting
If you see an error as listed in the following table, try the noted solution:
| Error | Solution |
|---------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| There was an error fetching the top labels. | Manually enable tasks by type feature in the [rails console](../../administration/troubleshooting/navigating_gitlab_via_rails_console.md#starting-a-rails-console-session), specifically `Feature.enable(:tasks_by_type_chart)`. |
## More resources
Learn more about Value Stream Analytics in the following resources:
......
......@@ -86,9 +86,6 @@ export default {
shouldRenderEmptyState() {
return !this.selectedGroup;
},
hasCustomizableCycleAnalytics() {
return Boolean(this.glFeatures.customizableCycleAnalytics);
},
shouldDisplayFilters() {
return this.selectedGroup && !this.errorCode;
},
......@@ -96,7 +93,7 @@ export default {
return this.featureFlags.hasDurationChart && !this.hasNoAccessError && !this.isLoading;
},
shouldDisplayTypeOfWorkCharts() {
return this.featureFlags.hasTasksByTypeChart && !this.hasNoAccessError && !this.isLoading;
return !this.hasNoAccessError && !this.isLoading;
},
isLoadingTypeOfWork() {
return this.isLoadingTasksByTypeChartTopLabels || this.isLoadingTasksByTypeChart;
......@@ -120,7 +117,6 @@ export default {
this.setFeatureFlags({
hasDurationChart: this.glFeatures.cycleAnalyticsScatterplotEnabled,
hasDurationChartMedian: this.glFeatures.cycleAnalyticsScatterplotMedianEnabled,
hasTasksByTypeChart: this.glFeatures.tasksByTypeChart,
});
},
methods: {
......@@ -281,7 +277,7 @@ export default {
:medians="medians"
:is-creating-custom-stage="isCreatingCustomStage"
:custom-stage-form-active="customStageFormActive"
:can-edit-stages="hasCustomizableCycleAnalytics"
:can-edit-stages="true"
:custom-ordering="enableCustomOrdering"
@reorderStage="onStageReorder"
@selectStage="onStageSelect"
......
......@@ -7,10 +7,8 @@ class Analytics::CycleAnalyticsController < Analytics::ApplicationController
increment_usage_counter Gitlab::UsageDataCounters::CycleAnalyticsCounter, :views, only: :show
before_action do
push_frontend_feature_flag(:customizable_cycle_analytics, default_enabled: true)
push_frontend_feature_flag(:cycle_analytics_scatterplot_enabled, default_enabled: true)
push_frontend_feature_flag(:cycle_analytics_scatterplot_median_enabled, default_enabled: true)
push_frontend_feature_flag(:tasks_by_type_chart, default_enabled: true)
end
before_action :load_group, only: :show
......
......@@ -9,10 +9,8 @@ class Groups::Analytics::CycleAnalyticsController < Groups::Analytics::Applicati
increment_usage_counter Gitlab::UsageDataCounters::CycleAnalyticsCounter, :views, only: :show
before_action do
push_frontend_feature_flag(:customizable_cycle_analytics, default_enabled: true)
push_frontend_feature_flag(:cycle_analytics_scatterplot_enabled, default_enabled: true)
push_frontend_feature_flag(:cycle_analytics_scatterplot_median_enabled, default_enabled: true)
push_frontend_feature_flag(:tasks_by_type_chart, default_enabled: true)
end
before_action :load_group, only: :show
......
---
title: Remove customizable_cycle_analytics feature flag
merge_request: 31189
author:
type: changed
......@@ -935,21 +935,5 @@ describe 'Group Value Stream Analytics', :js do
end
end
end
context 'not enabled' do
before do
stub_feature_flags(customizable_cycle_analytics: false)
select_group
end
context 'Add a stage button' do
it 'is not visible' do
expect(page).to have_selector('.js-add-stage-button', visible: false)
end
end
it_behaves_like 'manual ordering disabled'
end
end
end
......@@ -48,8 +48,6 @@ function createComponent({
shallow = true,
withStageSelected = false,
scatterplotEnabled = true,
tasksByTypeChartEnabled = true,
customizableCycleAnalyticsEnabled = false,
props = {},
} = {}) {
const func = shallow ? shallowMount : mount;
......@@ -68,8 +66,6 @@ function createComponent({
provide: {
glFeatures: {
cycleAnalyticsScatterplotEnabled: scatterplotEnabled,
tasksByTypeChart: tasksByTypeChartEnabled,
customizableCycleAnalytics: customizableCycleAnalyticsEnabled,
},
},
...opts,
......@@ -187,6 +183,10 @@ describe('Cycle Analytics component', () => {
displaysDurationChart(false);
});
it('does not display the add stage button', () => {
expect(wrapper.find('.js-add-stage-button').exists()).toBe(false);
});
describe('hideGroupDropDown = true', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
......@@ -208,7 +208,6 @@ describe('Cycle Analytics component', () => {
beforeEach(() => {
wrapper = createComponent({
withStageSelected: true,
tasksByTypeChartEnabled: false,
});
});
......@@ -240,29 +239,22 @@ describe('Cycle Analytics component', () => {
displaysStageTable(true);
});
it('does not display the add stage button', () => {
expect(wrapper.find('.js-add-stage-button').exists()).toBe(false);
});
describe('with no durationData', () => {
it('displays the duration chart', () => {
displaysDurationChart(true);
it('displays the add stage button', () => {
wrapper = createComponent({ shallow: false, withStageSelected: true });
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find('.js-add-stage-button').exists()).toBe(true);
});
});
describe('with durationData', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
wrapper.vm.$store.dispatch('setDateRange', {
skipFetch: true,
startDate: mockData.startDate,
endDate: mockData.endDate,
});
it('displays the tasks by type chart', () => {
wrapper = createComponent({ shallow: false, withStageSelected: true });
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find('.js-tasks-by-type-chart').exists()).toBe(true);
});
});
it('displays the duration chart', () => {
expect(wrapper.find(DurationChart).exists()).toBe(true);
});
it('displays the duration chart', () => {
displaysDurationChart(true);
});
describe('StageTable', () => {
......@@ -278,7 +270,6 @@ describe('Cycle Analytics component', () => {
},
shallow: false,
withStageSelected: true,
tasksByTypeChartEnabled: false,
});
});
......@@ -348,67 +339,6 @@ describe('Cycle Analytics component', () => {
displaysDurationChart(false);
});
});
describe('with customizableCycleAnalytics=true', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
wrapper = createComponent({
shallow: false,
withStageSelected: true,
customizableCycleAnalyticsEnabled: true,
tasksByTypeChartEnabled: false,
});
});
afterEach(() => {
wrapper.destroy();
mock.restore();
});
it('will display the add stage button', () => {
expect(wrapper.find('.js-add-stage-button').exists()).toBe(true);
});
});
describe('with tasksByTypeChart=true', () => {
beforeEach(() => {
wrapper = createComponent({
shallow: false,
withStageSelected: true,
customizableCycleAnalyticsEnabled: false,
tasksByTypeChartEnabled: true,
});
});
afterEach(() => {
wrapper.destroy();
});
it('displays the tasks by type chart', () => {
expect(wrapper.find('.js-tasks-by-type-chart').exists()).toBe(true);
});
});
describe('with tasksByTypeChart=false', () => {
beforeEach(() => {
mock = new MockAdapter(axios);
wrapper = createComponent({
shallow: false,
withStageSelected: true,
customizableCycleAnalyticsEnabled: false,
tasksByTypeChartEnabled: false,
});
});
afterEach(() => {
wrapper.destroy();
mock.restore();
});
it('does not render the tasks by type chart', () => {
expect(wrapper.find('.js-tasks-by-type-chart').exists()).toBe(false);
});
});
});
});
......@@ -556,7 +486,6 @@ describe('Cycle Analytics component', () => {
wrapper = createComponent({
shallow: false,
scatterplotEnabled: false,
tasksByTypeChartEnabled: false,
stubs: {
...defaultStubs,
},
......@@ -584,7 +513,6 @@ describe('Cycle Analytics component', () => {
wrapper = createComponent({
shallow: false,
scatterplotEnabled: false,
tasksByTypeChartEnabled: false,
stubs: {
...defaultStubs,
},
......
......@@ -36,7 +36,6 @@ describe('Cycle analytics actions', () => {
stages: [],
featureFlags: {
hasDurationChart: true,
hasTasksByTypeChart: true,
hasDurationChartMedian: true,
},
};
......
......@@ -28,7 +28,6 @@ const rootState = {
selectedGroup,
featureFlags: {
hasDurationChart: true,
hasTasksByTypeChart: true,
hasDurationChartMedian: true,
},
};
......
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