Project issue tracker functions refactored

This commit is contained in:
Andrew8xx8 2013-02-11 15:41:12 +04:00
parent 999fc2391b
commit 68a7ecdaaf
6 changed files with 52 additions and 29 deletions

View file

@ -205,6 +205,18 @@ class Project < ActiveRecord::Base
issues.tag_counts_on(:labels)
end
def issue_exists?(issue_id)
if used_default_issues_tracker?
self.issues.where(id: issue_id).first.present?
else
true
end
end
def used_default_issues_tracker?
self.issues_tracker == Project.issues_tracker.default_value
end
def services
[gitlab_ci_service].compact
end