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';
import * as Sentry from '@sentry/browser';
import { mapState, mapActions, mapGetters } from 'vuex';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import {
I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE,
I18N_DEFAULT_ERROR_MESSAGE,
......@@ -18,8 +17,6 @@ import { testIntegrationSettings } from '../api';
import ActiveCheckbox from './active_checkbox.vue';
import ConfirmationModal from './confirmation_modal.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 ResetConfirmationModal from './reset_confirmation_modal.vue';
import TriggerFields from './trigger_fields.vue';
......@@ -29,8 +26,6 @@ export default {
components: {
OverrideDropdown,
ActiveCheckbox,
JiraTriggerFields,
JiraIssuesFields,
TriggerFields,
DynamicField,
ConfirmationModal,
......@@ -54,12 +49,6 @@ export default {
GlModal: GlModalDirective,
SafeHtml,
},
mixins: [glFeatureFlagsMixin()],
provide() {
return {
hasSections: this.hasSections,
};
},
inject: {
helpHtml: {
default: '',
......@@ -80,9 +69,6 @@ export default {
isEditable() {
return this.propsSource.editable;
},
isJira() {
return this.propsSource.type === 'jira';
},
isInstanceOrGroupLevel() {
return (
this.customState.integrationLevel === integrationLevels.INSTANCE ||
......@@ -98,14 +84,11 @@ export default {
disableButtons() {
return Boolean(this.isSaving || this.isResetting || this.isTesting);
},
sectionsEnabled() {
return this.glFeatures.integrationFormSections;
},
hasSections() {
return this.sectionsEnabled && this.customState.sections.length !== 0;
return this.customState.sections.length !== 0;
},
fieldsWithoutSection() {
return this.sectionsEnabled
return this.hasSections
? this.propsSource.fields.filter((field) => !field.section)
: this.propsSource.fields;
},
......@@ -257,14 +240,8 @@ export default {
:key="`${currentKey}-active-checkbox`"
@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
v-else-if="propsSource.triggerEvents.length && !hasSections"
v-if="propsSource.triggerEvents.length && !hasSections"
:key="`${currentKey}-trigger-fields`"
:events="propsSource.triggerEvents"
:type="propsSource.type"
......@@ -275,13 +252,6 @@ export default {
v-bind="field"
: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>
......
......@@ -16,11 +16,6 @@ export default {
JiraIssueCreationVulnerabilities: () =>
import('ee_component/integrations/edit/components/jira_issue_creation_vulnerabilities.vue'),
},
inject: {
hasSections: {
default: false,
},
},
props: {
showJiraIssuesIntegration: {
type: Boolean,
......@@ -86,7 +81,6 @@ export default {
},
},
i18n: {
sectionTitle: s__('JiraService|View Jira issues in GitLab'),
sectionDescription: s__(
'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 {
<template>
<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">
<input name="service[issues_enabled]" type="hidden" :value="enableJiraIssues || false" />
<gl-form-checkbox
......@@ -151,8 +137,7 @@ export default {
show-premium-message
:upgrade-plan-path="upgradePlanPath"
/>
</div>
</gl-form-group>
<template v-if="showJiraIssuesIntegration">
<gl-form-group
:label="$options.i18n.projectKeyLabel"
......
......@@ -62,11 +62,6 @@ export default {
GlLink,
GlSprintf,
},
inject: {
hasSections: {
default: false,
},
},
props: {
initialTriggerCommit: {
type: Boolean,
......@@ -138,17 +133,7 @@ export default {
<template>
<div>
<gl-form-group
: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.',
)
"
>
<div class="gl-mb-5">
<input name="service[commit_events]" type="hidden" :value="triggerCommit || false" />
<gl-form-checkbox v-model="triggerCommit" :disabled="isInheriting">
{{ __('Commit') }}
......@@ -162,7 +147,7 @@ export default {
<gl-form-checkbox v-model="triggerMergeRequest" :disabled="isInheriting">
{{ __('Merge request') }}
</gl-form-checkbox>
</gl-form-group>
</div>
<gl-form-group
v-show="showTriggerSettings"
......
......@@ -5,10 +5,6 @@ class Admin::IntegrationsController < Admin::ApplicationController
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
def overrides
......
......@@ -7,10 +7,6 @@ module Groups
before_action :authorize_admin_group!
before_action do
push_frontend_feature_flag(:integration_form_sections, group, default_enabled: :yaml)
end
feature_category :integrations
layout 'group_settings'
......
......@@ -13,10 +13,6 @@ class Projects::ServicesController < Projects::ApplicationController
before_action :set_deprecation_notice_for_prometheus_integration, only: [:edit, :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
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 ""
msgid "JiraService|Using Jira for issue tracking?"
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."
msgstr ""
......
......@@ -9,8 +9,6 @@ import ActiveCheckbox from '~/integrations/edit/components/active_checkbox.vue';
import ConfirmationModal from '~/integrations/edit/components/confirmation_modal.vue';
import DynamicField from '~/integrations/edit/components/dynamic_field.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 ResetConfirmationModal from '~/integrations/edit/components/reset_confirmation_modal.vue';
import TriggerFields from '~/integrations/edit/components/trigger_fields.vue';
......@@ -55,7 +53,6 @@ describe('IntegrationForm', () => {
OverrideDropdown,
ActiveCheckbox,
ConfirmationModal,
JiraTriggerFields,
TriggerFields,
},
mocks: {
......@@ -74,8 +71,6 @@ describe('IntegrationForm', () => {
const findProjectSaveButton = () => wrapper.findByTestId('save-button');
const findInstanceOrGroupSaveButton = () => wrapper.findByTestId('save-button-instance-group');
const findTestButton = () => wrapper.findByTestId('test-button');
const findJiraTriggerFields = () => wrapper.findComponent(JiraTriggerFields);
const findJiraIssuesFields = () => wrapper.findComponent(JiraIssuesFields);
const findTriggerFields = () => wrapper.findComponent(TriggerFields);
const findGlForm = () => wrapper.findComponent(GlForm);
const findRedirectToField = () => wrapper.findByTestId('redirect-to-field');
......@@ -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', () => {
it('renders TriggerFields', () => {
const events = [{ title: 'push' }];
......@@ -272,9 +224,6 @@ describe('IntegrationForm', () => {
];
createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: {
sections: [mockSectionConnection],
fields: [...sectionFields, ...nonSectionFields],
......@@ -363,9 +312,6 @@ describe('IntegrationForm', () => {
describe('when integration has sections', () => {
beforeEach(() => {
createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: {
sections: [mockSectionConnection],
},
......@@ -396,9 +342,6 @@ describe('IntegrationForm', () => {
];
createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: {
sections: [mockSectionConnection],
fields: [...sectionFields, ...nonSectionFields],
......@@ -417,9 +360,6 @@ describe('IntegrationForm', () => {
({ formActive, novalidate }) => {
beforeEach(() => {
createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: {
sections: [mockSectionConnection],
showActive: true,
......@@ -441,9 +381,6 @@ describe('IntegrationForm', () => {
jest.spyOn(document, 'querySelector').mockReturnValue(document.createElement('form'));
createComponent({
provide: {
glFeatures: { integrationFormSections: true },
},
customStateProps: {
sections: [mockSectionConnection],
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