diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 4 | ||||
-rw-r--r-- | app/models/project_services/issue_tracker_service.rb | 8 | ||||
-rw-r--r-- | app/models/project_services/jira_service.rb | 11 |
3 files changed, 23 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 890768ccf58..6d9a0e5e813 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1190,6 +1190,10 @@ class Project < ApplicationRecord update_column(:has_external_issue_tracker, services.external_issue_trackers.any?) if Gitlab::Database.read_write? end + def external_references_supported? + external_issue_tracker&.support_cross_reference? + end + def has_wiki? wiki_enabled? || has_external_wiki? end diff --git a/app/models/project_services/issue_tracker_service.rb b/app/models/project_services/issue_tracker_service.rb index 2bf14a6ed25..3f7e8a720aa 100644 --- a/app/models/project_services/issue_tracker_service.rb +++ b/app/models/project_services/issue_tracker_service.rb @@ -151,6 +151,14 @@ class IssueTrackerService < Service result end + def support_close_issue? + false + end + + def support_cross_reference? + false + end + private def enabled_in_gitlab_config diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb index e3cd345d065..2766ba11c97 100644 --- a/app/models/project_services/jira_service.rb +++ b/app/models/project_services/jira_service.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class JiraService < IssueTrackerService + extend ::Gitlab::Utils::Override include Gitlab::Routing include ApplicationHelper include ActionView::Helpers::AssetUrlHelper @@ -205,6 +206,16 @@ class JiraService < IssueTrackerService nil end + override :support_close_issue? + def support_close_issue? + true + end + + override :support_cross_reference? + def support_cross_reference? + true + end + private def test_settings |