Commit a209e62e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix jira integration for EE

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent ae713ae8
......@@ -752,4 +752,12 @@ class Project < ActiveRecord::Base
errors.add(:base, 'Failed create wiki')
false
end
def reference_issue_tracker?
default_issues_tracker? || jira_tracker_active?
end
def jira_tracker_active?
jira_tracker? && jira_service.active
end
end
......@@ -92,7 +92,7 @@ class GitPushService
end
end
if project.default_issues_tracker?
if project.reference_issue_tracker?
create_cross_reference_notes(commit, issues_to_close)
end
end
......
......@@ -224,7 +224,7 @@ class SystemNoteService
#
# Returns Boolean
def self.cross_reference_disallowed?(noteable, mentioner)
return true if noteable.is_a?(ExternalIssue)
return true if noteable.is_a?(ExternalIssue) && !noteable.project.jira_tracker_active?
return false unless mentioner.is_a?(MergeRequest)
return false unless noteable.is_a?(Commit)
......
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