Commit 154416fd authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '283850-feature-flag-enable-jira-for-vulnerabilities' into 'master'

Remove jira_for_vulnerabilities feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!55952
parents 2b11c0c4 19e52066
<script>
import { GlFormGroup, GlFormCheckbox, GlFormInput, GlSprintf, GlLink } from '@gitlab/ui';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import eventHub from '../event_hub';
import JiraUpgradeCta from './jira_upgrade_cta.vue';
......@@ -16,7 +15,6 @@ export default {
JiraIssueCreationVulnerabilities: () =>
import('ee_component/integrations/edit/components/jira_issue_creation_vulnerabilities.vue'),
},
mixins: [glFeatureFlagsMixin()],
props: {
showJiraIssuesIntegration: {
type: Boolean,
......@@ -76,7 +74,7 @@ export default {
return !this.enableJiraIssues || Boolean(this.projectKey) || !this.validated;
},
showJiraVulnerabilitiesOptions() {
return this.showJiraVulnerabilitiesIntegration && this.glFeatures.jiraForVulnerabilities;
return this.showJiraVulnerabilitiesIntegration;
},
showUltimateUpgrade() {
return this.showJiraIssuesIntegration && !this.showJiraVulnerabilitiesIntegration;
......
......@@ -17,7 +17,6 @@ class Projects::PipelinesController < Projects::ApplicationController
push_frontend_feature_flag(:pipeline_filter_jobs, project, default_enabled: :yaml)
push_frontend_feature_flag(:graphql_pipeline_details, project, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:graphql_pipeline_details_users, current_user, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:jira_for_vulnerabilities, project, type: :development, default_enabled: :yaml)
end
before_action :ensure_pipeline, only: [:show, :downloadable_artifacts]
......
......@@ -11,9 +11,6 @@ class Projects::ServicesController < Projects::ApplicationController
before_action :web_hook_logs, only: [:edit, :update]
before_action :set_deprecation_notice_for_prometheus_service, only: [:edit, :update]
before_action :redirect_deprecated_prometheus_service, only: [:update]
before_action only: :edit do
push_frontend_feature_flag(:jira_for_vulnerabilities, @project, type: :development, default_enabled: :yaml)
end
respond_to :html
......
---
name: jira_for_vulnerabilities
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46982
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/276893
type: development
group: group::threat insights
default_enabled: true
......@@ -5,7 +5,6 @@ import { VULNERABILITY_MODAL_ID } from 'ee/vue_shared/security_reports/component
import { BV_SHOW_MODAL } from '~/lib/utils/constants';
import { visitUrl } from '~/lib/utils/url_utility';
import { s__ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export const i18n = {
moreInfo: s__('SecurityReports|More info'),
......@@ -24,7 +23,6 @@ export default {
directives: {
GlTooltip: GlTooltipDirective,
},
mixins: [glFeatureFlagsMixin()],
props: {
vulnerability: {
type: Object,
......@@ -49,10 +47,7 @@ export default {
computed: {
...mapState('vulnerabilities', ['isCreatingIssue', 'isDismissingVulnerability']),
isJiraVulnerabilityIssuesEnabled() {
return (
this.glFeatures?.jiraForVulnerabilities &&
Boolean(this?.vulnerability?.create_jira_issue_url)
);
return Boolean(this?.vulnerability?.create_jira_issue_url);
},
createIssueButtonLabel() {
const { $options } = this;
......
......@@ -11,7 +11,6 @@ import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import Poll from '~/lib/utils/poll';
import { s__, __ } from '~/locale';
import initUserPopovers from '~/user_popovers';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import GenericReportSection from './generic_report/report_section.vue';
import HistoryEntry from './history_entry.vue';
import RelatedIssues from './related_issues.vue';
......@@ -30,7 +29,6 @@ export default {
GlIcon,
StatusDescription,
},
mixins: [glFeatureFlagMixin()],
inject: {
createJiraIssueUrl: {
default: '',
......@@ -222,10 +220,7 @@ export default {
class="card-body"
/>
</div>
<related-jira-issues
v-if="glFeatures.jiraForVulnerabilities && createJiraIssueUrl"
class="gl-mt-6"
/>
<related-jira-issues v-if="createJiraIssueUrl" class="gl-mt-6" />
<related-issues
v-else
:endpoint="issueLinksEndpoint"
......
......@@ -8,10 +8,6 @@ module Projects
include IssuableActions
include RendersNotes
before_action do
push_frontend_feature_flag(:jira_for_vulnerabilities, @project, default_enabled: :yaml)
end
before_action :vulnerability, except: :index
alias_method :vulnerable, :project
......
......@@ -12,10 +12,7 @@ module EE
end
def jira_vulnerabilities_integration_available?
feature_enabled = ::Feature.enabled?(:jira_for_vulnerabilities, parent, default_enabled: :yaml)
feature_available = parent.present? ? parent&.feature_available?(:jira_vulnerabilities_integration) : License.feature_available?(:jira_vulnerabilities_integration)
feature_enabled && feature_available
parent.present? ? parent.licensed_feature_available?(:jira_vulnerabilities_integration) : License.feature_available?(:jira_vulnerabilities_integration)
end
def jira_vulnerabilities_integration_enabled?
......
---
title: Allow using Jira for tracking vulnerabilities
merge_request: 55952
author:
type: changed
......@@ -104,9 +104,6 @@ describe('Security Dashboard Action Buttons', () => {
vulnerability: mockDataVulnerabilities[8],
canCreateIssue: true,
},
provide: {
glFeatures: { jiraForVulnerabilities: true },
},
});
});
......
......@@ -301,7 +301,6 @@ describe('Vulnerability Footer', () => {
{
provide: {
createJiraIssueUrl: 'http://foo',
glFeatures: { jiraForVulnerabilities: true },
},
},
);
......
......@@ -62,21 +62,9 @@ RSpec.describe EE::ServicesHelper do
end
end
context 'when flag is disabled for jira_for_vulnerabilities' do
before do
stub_licensed_features(jira_issues_integration: true, jira_vulnerabilities_integration: true)
stub_feature_flags(jira_for_vulnerabilities: false)
end
it 'includes show_jira_issues_integration' do
is_expected.to include(jira_fields.merge(show_jira_issues_integration: 'true'))
end
end
context 'when all flags are enabled' do
before do
stub_licensed_features(jira_issues_integration: true, jira_vulnerabilities_integration: true)
stub_feature_flags(jira_for_vulnerabilities: true)
end
it 'includes all Jira fields' do
......
......@@ -52,24 +52,6 @@ RSpec.describe JiraService do
it { is_expected.to be_falsey }
end
context 'when jira integration is not available for the project' do
before do
stub_feature_flags(jira_for_vulnerabilities: false)
end
context 'when vulnerabilities_enabled is set to false' do
it { is_expected.to be_falsey }
end
context 'when vulnerabilities_enabled is set to true' do
before do
jira_service.vulnerabilities_enabled = true
end
it { is_expected.to eq(false) }
end
end
context 'when jira integration is available for the project' do
before do
stub_licensed_features(jira_vulnerabilities_integration: true)
......
......@@ -136,7 +136,7 @@ describe('JiraIssuesFields', () => {
describe('Vulnerabilities creation', () => {
beforeEach(() => {
createComponent({ provide: { glFeatures: { jiraForVulnerabilities: true } } });
createComponent();
});
it.each([true, false])(
......@@ -178,18 +178,6 @@ describe('JiraIssuesFields', () => {
expect(eventHubEmitSpy).toHaveBeenCalledWith('getJiraIssueTypes');
});
describe('with "jiraForVulnerabilities" feature flag disabled', () => {
beforeEach(async () => {
createComponent({
provide: { glFeatures: { jiraForVulnerabilities: false } },
});
});
it('does not show section', () => {
expect(findJiraForVulnerabilities().exists()).toBe(false);
});
});
});
});
});
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