summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 13fd383237c..b28a7ca429c 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -499,6 +499,10 @@ class Project < ActiveRecord::Base
@ci_service ||= ci_services.find(&:activated?)
end
+ def jira_tracker?
+ issues_tracker.to_param == 'jira'
+ end
+
def avatar_type
unless self.avatar.image?
self.errors.add :avatar, 'only images allowed'
@@ -799,6 +803,10 @@ class Project < ActiveRecord::Base
false
end
+ def jira_tracker_active?
+ jira_tracker? && jira_service.active
+ end
+
def ci_commit(sha)
ci_commits.find_by(sha: sha)
end