Commit c8913720 authored by Alan Paruszewski's avatar Alan Paruszewski

Fix saving Jira Configuration for Group

parent 1e6580e9
...@@ -12,7 +12,7 @@ module EE ...@@ -12,7 +12,7 @@ module EE
end end
def jira_vulnerabilities_integration_enabled? def jira_vulnerabilities_integration_enabled?
project.jira_vulnerabilities_integration_available? && vulnerabilities_enabled project&.jira_vulnerabilities_integration_available? && vulnerabilities_enabled
end end
def project_key_required? def project_key_required?
......
---
title: Fix Group Jira Integration configuration page
merge_request: 47944
author:
type: fixed
...@@ -40,6 +40,12 @@ RSpec.describe JiraService do ...@@ -40,6 +40,12 @@ RSpec.describe JiraService do
describe 'jira_vulnerabilities_integration_enabled?' do describe 'jira_vulnerabilities_integration_enabled?' do
subject(:jira_vulnerabilities_integration_enabled) { jira_service.jira_vulnerabilities_integration_enabled? } subject(:jira_vulnerabilities_integration_enabled) { jira_service.jira_vulnerabilities_integration_enabled? }
context 'when integration is not configured for the project' do
let(:options) { { project: nil } }
it { is_expected.to be_falsey }
end
context 'when jira integration is not available for the project' do context 'when jira integration is not available for the project' do
before do before do
allow(jira_service.project).to receive(:jira_vulnerabilities_integration_available?).and_return(false) allow(jira_service.project).to receive(:jira_vulnerabilities_integration_available?).and_return(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