Commit e6379b14 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '352827-remove-integration_form_sections-feature-flag' into 'master'

Remove integration_form_sections feature flag

See merge request gitlab-org/gitlab!83271
parents 0c70afb6 1dd968e6
...@@ -4,7 +4,6 @@ import axios from 'axios'; ...@@ -4,7 +4,6 @@ import axios from 'axios';
import * as Sentry from '@sentry/browser'; import * as Sentry from '@sentry/browser';
import { mapState, mapActions, mapGetters } from 'vuex'; import { mapState, mapActions, mapGetters } from 'vuex';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { import {
I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE, I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE,
I18N_DEFAULT_ERROR_MESSAGE, I18N_DEFAULT_ERROR_MESSAGE,
...@@ -18,8 +17,6 @@ import { testIntegrationSettings } from '../api'; ...@@ -18,8 +17,6 @@ import { testIntegrationSettings } from '../api';
import ActiveCheckbox from './active_checkbox.vue'; import ActiveCheckbox from './active_checkbox.vue';
import ConfirmationModal from './confirmation_modal.vue'; import ConfirmationModal from './confirmation_modal.vue';
import DynamicField from './dynamic_field.vue'; import DynamicField from './dynamic_field.vue';
import JiraIssuesFields from './jira_issues_fields.vue';
import JiraTriggerFields from './jira_trigger_fields.vue';
import OverrideDropdown from './override_dropdown.vue'; import OverrideDropdown from './override_dropdown.vue';
import ResetConfirmationModal from './reset_confirmation_modal.vue'; import ResetConfirmationModal from './reset_confirmation_modal.vue';
import TriggerFields from './trigger_fields.vue'; import TriggerFields from './trigger_fields.vue';
...@@ -29,8 +26,6 @@ export default { ...@@ -29,8 +26,6 @@ export default {
components: { components: {
OverrideDropdown, OverrideDropdown,
ActiveCheckbox, ActiveCheckbox,
JiraTriggerFields,
JiraIssuesFields,
TriggerFields, TriggerFields,
DynamicField, DynamicField,
ConfirmationModal, ConfirmationModal,
...@@ -54,12 +49,6 @@ export default { ...@@ -54,12 +49,6 @@ export default {
GlModal: GlModalDirective, GlModal: GlModalDirective,
SafeHtml, SafeHtml,
}, },
mixins: [glFeatureFlagsMixin()],
provide() {
return {
hasSections: this.hasSections,
};
},
inject: { inject: {
helpHtml: { helpHtml: {
default: '', default: '',
...@@ -80,9 +69,6 @@ export default { ...@@ -80,9 +69,6 @@ export default {
isEditable() { isEditable() {
return this.propsSource.editable; return this.propsSource.editable;
}, },
isJira() {
return this.propsSource.type === 'jira';
},
isInstanceOrGroupLevel() { isInstanceOrGroupLevel() {
return ( return (
this.customState.integrationLevel === integrationLevels.INSTANCE || this.customState.integrationLevel === integrationLevels.INSTANCE ||
...@@ -98,14 +84,11 @@ export default { ...@@ -98,14 +84,11 @@ export default {
disableButtons() { disableButtons() {
return Boolean(this.isSaving || this.isResetting || this.isTesting); return Boolean(this.isSaving || this.isResetting || this.isTesting);
}, },
sectionsEnabled() {
return this.glFeatures.integrationFormSections;
},
hasSections() { hasSections() {
return this.sectionsEnabled && this.customState.sections.length !== 0; return this.customState.sections.length !== 0;
}, },
fieldsWithoutSection() { fieldsWithoutSection() {
return this.sectionsEnabled return this.hasSections
? this.propsSource.fields.filter((field) => !field.section) ? this.propsSource.fields.filter((field) => !field.section)
: this.propsSource.fields; : this.propsSource.fields;
}, },
...@@ -257,14 +240,8 @@ export default { ...@@ -257,14 +240,8 @@ export default {
:key="`${currentKey}-active-checkbox`" :key="`${currentKey}-active-checkbox`"
@toggle-integration-active="onToggleIntegrationState" @toggle-integration-active="onToggleIntegrationState"
/> />
<jira-trigger-fields
v-if="isJira && !hasSections"
:key="`${currentKey}-jira-trigger-fields`"
v-bind="propsSource.triggerFieldsProps"
:is-validated="isValidated"
/>
<trigger-fields <trigger-fields
v-else-if="propsSource.triggerEvents.length && !hasSections" v-if="propsSource.triggerEvents.length && !hasSections"
:key="`${currentKey}-trigger-fields`" :key="`${currentKey}-trigger-fields`"
:events="propsSource.triggerEvents" :events="propsSource.triggerEvents"
:type="propsSource.type" :type="propsSource.type"
...@@ -275,13 +252,6 @@ export default { ...@@ -275,13 +252,6 @@ export default {
v-bind="field" v-bind="field"
:is-validated="isValidated" :is-validated="isValidated"
/> />
<jira-issues-fields
v-if="isJira && !isInstanceOrGroupLevel && !hasSections"
:key="`${currentKey}-jira-issues-fields`"
v-bind="propsSource.jiraIssuesProps"
:is-validated="isValidated"
@request-jira-issue-types="onRequestJiraIssueTypes"
/>
</div> </div>
</div> </div>
......
...@@ -16,11 +16,6 @@ export default { ...@@ -16,11 +16,6 @@ export default {
JiraIssueCreationVulnerabilities: () => JiraIssueCreationVulnerabilities: () =>
import('ee_component/integrations/edit/components/jira_issue_creation_vulnerabilities.vue'), import('ee_component/integrations/edit/components/jira_issue_creation_vulnerabilities.vue'),
}, },
inject: {
hasSections: {
default: false,
},
},
props: { props: {
showJiraIssuesIntegration: { showJiraIssuesIntegration: {
type: Boolean, type: Boolean,
...@@ -86,7 +81,6 @@ export default { ...@@ -86,7 +81,6 @@ export default {
}, },
}, },
i18n: { i18n: {
sectionTitle: s__('JiraService|View Jira issues in GitLab'),
sectionDescription: s__( sectionDescription: s__(
'JiraService|Work on Jira issues without leaving GitLab. Add a Jira menu to access a read-only list of your Jira issues.', 'JiraService|Work on Jira issues without leaving GitLab. Add a Jira menu to access a read-only list of your Jira issues.',
), ),
...@@ -106,14 +100,6 @@ export default { ...@@ -106,14 +100,6 @@ export default {
<template> <template>
<div> <div>
<gl-form-group
:label="hasSections ? null : $options.i18n.sectionTitle"
label-for="jira-issue-settings"
>
<div id="jira-issue-settings">
<p v-if="!hasSections">
{{ $options.i18n.sectionDescription }}
</p>
<template v-if="showJiraIssuesIntegration"> <template v-if="showJiraIssuesIntegration">
<input name="service[issues_enabled]" type="hidden" :value="enableJiraIssues || false" /> <input name="service[issues_enabled]" type="hidden" :value="enableJiraIssues || false" />
<gl-form-checkbox <gl-form-checkbox
...@@ -151,8 +137,7 @@ export default { ...@@ -151,8 +137,7 @@ export default {
show-premium-message show-premium-message
:upgrade-plan-path="upgradePlanPath" :upgrade-plan-path="upgradePlanPath"
/> />
</div>
</gl-form-group>
<template v-if="showJiraIssuesIntegration"> <template v-if="showJiraIssuesIntegration">
<gl-form-group <gl-form-group
:label="$options.i18n.projectKeyLabel" :label="$options.i18n.projectKeyLabel"
......
...@@ -62,11 +62,6 @@ export default { ...@@ -62,11 +62,6 @@ export default {
GlLink, GlLink,
GlSprintf, GlSprintf,
}, },
inject: {
hasSections: {
default: false,
},
},
props: { props: {
initialTriggerCommit: { initialTriggerCommit: {
type: Boolean, type: Boolean,
...@@ -138,17 +133,7 @@ export default { ...@@ -138,17 +133,7 @@ export default {
<template> <template>
<div> <div>
<gl-form-group <div class="gl-mb-5">
:label="hasSections ? null : __('Trigger')"
label-for="service[trigger]"
:description="
hasSections
? null
: s__(
'JiraService|When a Jira issue is mentioned in a commit or merge request, a remote link and comment (if enabled) will be created.',
)
"
>
<input name="service[commit_events]" type="hidden" :value="triggerCommit || false" /> <input name="service[commit_events]" type="hidden" :value="triggerCommit || false" />
<gl-form-checkbox v-model="triggerCommit" :disabled="isInheriting"> <gl-form-checkbox v-model="triggerCommit" :disabled="isInheriting">
{{ __('Commit') }} {{ __('Commit') }}
...@@ -162,7 +147,7 @@ export default { ...@@ -162,7 +147,7 @@ export default {
<gl-form-checkbox v-model="triggerMergeRequest" :disabled="isInheriting"> <gl-form-checkbox v-model="triggerMergeRequest" :disabled="isInheriting">
{{ __('Merge request') }} {{ __('Merge request') }}
</gl-form-checkbox> </gl-form-checkbox>
</gl-form-group> </div>
<gl-form-group <gl-form-group
v-show="showTriggerSettings" v-show="showTriggerSettings"
......
...@@ -5,10 +5,6 @@ class Admin::IntegrationsController < Admin::ApplicationController ...@@ -5,10 +5,6 @@ class Admin::IntegrationsController < Admin::ApplicationController
before_action :not_found, unless: -> { instance_level_integrations? } before_action :not_found, unless: -> { instance_level_integrations? }
before_action do
push_frontend_feature_flag(:integration_form_sections, default_enabled: :yaml)
end
feature_category :integrations feature_category :integrations
def overrides def overrides
......
...@@ -7,10 +7,6 @@ module Groups ...@@ -7,10 +7,6 @@ module Groups
before_action :authorize_admin_group! before_action :authorize_admin_group!
before_action do
push_frontend_feature_flag(:integration_form_sections, group, default_enabled: :yaml)
end
feature_category :integrations feature_category :integrations
layout 'group_settings' layout 'group_settings'
......
...@@ -13,10 +13,6 @@ class Projects::ServicesController < Projects::ApplicationController ...@@ -13,10 +13,6 @@ class Projects::ServicesController < Projects::ApplicationController
before_action :set_deprecation_notice_for_prometheus_integration, only: [:edit, :update] before_action :set_deprecation_notice_for_prometheus_integration, only: [:edit, :update]
before_action :redirect_deprecated_prometheus_integration, only: [:update] before_action :redirect_deprecated_prometheus_integration, only: [:update]
before_action do
push_frontend_feature_flag(:integration_form_sections, project, default_enabled: :yaml)
end
respond_to :html respond_to :html
layout "project_settings" layout "project_settings"
......
---
name: integration_form_sections
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/80712
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/352827
milestone: '14.9'
type: development
group: group::integrations
default_enabled: true
...@@ -21328,9 +21328,6 @@ msgstr "" ...@@ -21328,9 +21328,6 @@ msgstr ""
msgid "JiraService|Using Jira for issue tracking?" msgid "JiraService|Using Jira for issue tracking?"
msgstr "" msgstr ""
msgid "JiraService|View Jira issues in GitLab"
msgstr ""
msgid "JiraService|Warning: All GitLab users with access to this GitLab project can view all issues from the Jira project you select." msgid "JiraService|Warning: All GitLab users with access to this GitLab project can view all issues from the Jira project you select."
msgstr "" msgstr ""
......
...@@ -9,8 +9,6 @@ import ActiveCheckbox from '~/integrations/edit/components/active_checkbox.vue'; ...@@ -9,8 +9,6 @@ import ActiveCheckbox from '~/integrations/edit/components/active_checkbox.vue';
import ConfirmationModal from '~/integrations/edit/components/confirmation_modal.vue'; import ConfirmationModal from '~/integrations/edit/components/confirmation_modal.vue';
import DynamicField from '~/integrations/edit/components/dynamic_field.vue'; import DynamicField from '~/integrations/edit/components/dynamic_field.vue';
import IntegrationForm from '~/integrations/edit/components/integration_form.vue'; import IntegrationForm from '~/integrations/edit/components/integration_form.vue';
import JiraIssuesFields from '~/integrations/edit/components/jira_issues_fields.vue';
import JiraTriggerFields from '~/integrations/edit/components/jira_trigger_fields.vue';
import OverrideDropdown from '~/integrations/edit/components/override_dropdown.vue'; import OverrideDropdown from '~/integrations/edit/components/override_dropdown.vue';
import ResetConfirmationModal from '~/integrations/edit/components/reset_confirmation_modal.vue'; import ResetConfirmationModal from '~/integrations/edit/components/reset_confirmation_modal.vue';
import TriggerFields from '~/integrations/edit/components/trigger_fields.vue'; import TriggerFields from '~/integrations/edit/components/trigger_fields.vue';
...@@ -55,7 +53,6 @@ describe('IntegrationForm', () => { ...@@ -55,7 +53,6 @@ describe('IntegrationForm', () => {
OverrideDropdown, OverrideDropdown,
ActiveCheckbox, ActiveCheckbox,
ConfirmationModal, ConfirmationModal,
JiraTriggerFields,
TriggerFields, TriggerFields,
}, },
mocks: { mocks: {
...@@ -74,8 +71,6 @@ describe('IntegrationForm', () => { ...@@ -74,8 +71,6 @@ describe('IntegrationForm', () => {
const findProjectSaveButton = () => wrapper.findByTestId('save-button'); const findProjectSaveButton = () => wrapper.findByTestId('save-button');
const findInstanceOrGroupSaveButton = () => wrapper.findByTestId('save-button-instance-group'); const findInstanceOrGroupSaveButton = () => wrapper.findByTestId('save-button-instance-group');
const findTestButton = () => wrapper.findByTestId('test-button'); const findTestButton = () => wrapper.findByTestId('test-button');
const findJiraTriggerFields = () => wrapper.findComponent(JiraTriggerFields);
const findJiraIssuesFields = () => wrapper.findComponent(JiraIssuesFields);
const findTriggerFields = () => wrapper.findComponent(TriggerFields); const findTriggerFields = () => wrapper.findComponent(TriggerFields);
const findGlForm = () => wrapper.findComponent(GlForm); const findGlForm = () => wrapper.findComponent(GlForm);
const findRedirectToField = () => wrapper.findByTestId('redirect-to-field'); const findRedirectToField = () => wrapper.findByTestId('redirect-to-field');
...@@ -198,49 +193,6 @@ describe('IntegrationForm', () => { ...@@ -198,49 +193,6 @@ describe('IntegrationForm', () => {
}); });
}); });
describe('type is "slack"', () => {
beforeEach(() => {
createComponent({
customStateProps: { type: 'slack' },
});
});
it('does not render JiraTriggerFields', () => {
expect(findJiraTriggerFields().exists()).toBe(false);
});
it('does not render JiraIssuesFields', () => {
expect(findJiraIssuesFields().exists()).toBe(false);
});
});
describe('type is "jira"', () => {
beforeEach(() => {
jest.spyOn(document, 'querySelector').mockReturnValue(document.createElement('form'));
createComponent({
customStateProps: { type: 'jira', testPath: '/test' },
mountFn: mountExtended,
});
});
it('renders JiraTriggerFields', () => {
expect(findJiraTriggerFields().exists()).toBe(true);
});
it('renders JiraIssuesFields', () => {
expect(findJiraIssuesFields().exists()).toBe(true);
});
describe('when JiraIssueFields emits `request-jira-issue-types` event', () => {
it('dispatches `requestJiraIssueTypes` action', () => {
findJiraIssuesFields().vm.$emit('request-jira-issue-types');
expect(dispatch).toHaveBeenCalledWith('requestJiraIssueTypes', expect.any(FormData));
});
});
});
describe('triggerEvents is present', () => { describe('triggerEvents is present', () => {
it('renders TriggerFields', () => { it('renders TriggerFields', () => {
const events = [{ title: 'push' }]; const events = [{ title: 'push' }];
...@@ -272,9 +224,6 @@ describe('IntegrationForm', () => { ...@@ -272,9 +224,6 @@ describe('IntegrationForm', () => {
]; ];
createComponent({ createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: { customStateProps: {
sections: [mockSectionConnection], sections: [mockSectionConnection],
fields: [...sectionFields, ...nonSectionFields], fields: [...sectionFields, ...nonSectionFields],
...@@ -363,9 +312,6 @@ describe('IntegrationForm', () => { ...@@ -363,9 +312,6 @@ describe('IntegrationForm', () => {
describe('when integration has sections', () => { describe('when integration has sections', () => {
beforeEach(() => { beforeEach(() => {
createComponent({ createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: { customStateProps: {
sections: [mockSectionConnection], sections: [mockSectionConnection],
}, },
...@@ -396,9 +342,6 @@ describe('IntegrationForm', () => { ...@@ -396,9 +342,6 @@ describe('IntegrationForm', () => {
]; ];
createComponent({ createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: { customStateProps: {
sections: [mockSectionConnection], sections: [mockSectionConnection],
fields: [...sectionFields, ...nonSectionFields], fields: [...sectionFields, ...nonSectionFields],
...@@ -417,9 +360,6 @@ describe('IntegrationForm', () => { ...@@ -417,9 +360,6 @@ describe('IntegrationForm', () => {
({ formActive, novalidate }) => { ({ formActive, novalidate }) => {
beforeEach(() => { beforeEach(() => {
createComponent({ createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: { customStateProps: {
sections: [mockSectionConnection], sections: [mockSectionConnection],
showActive: true, showActive: true,
...@@ -441,9 +381,6 @@ describe('IntegrationForm', () => { ...@@ -441,9 +381,6 @@ describe('IntegrationForm', () => {
jest.spyOn(document, 'querySelector').mockReturnValue(document.createElement('form')); jest.spyOn(document, 'querySelector').mockReturnValue(document.createElement('form'));
createComponent({ createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: { customStateProps: {
sections: [mockSectionConnection], sections: [mockSectionConnection],
testPath: '/test', testPath: '/test',
......
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