diff options
author | Drew Blessing <drew@gitlab.com> | 2015-12-17 16:08:14 -0600 |
---|---|---|
committer | Drew Blessing <drew@gitlab.com> | 2015-12-18 14:19:48 -0600 |
commit | f177aaa5fa789654dc440d6ec4ae3546544c1401 (patch) | |
tree | 709b259ea7903da9ac28e5393cc29d0780a6c63a /app/models/project.rb | |
parent | 27859f7ed9e1efe98b8386844d0a7e69fd58277a (diff) | |
download | gitlab-ce-f177aaa5fa789654dc440d6ec4ae3546544c1401.tar.gz |
Backport JIRA service
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 8 |
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 |