-
- Downloads
Add Project#get_issue
- app/models/project.rb 8 additions, 8 deletionsapp/models/project.rb
- lib/gitlab/markdown/issue_reference_filter.rb 6 additions, 7 deletionslib/gitlab/markdown/issue_reference_filter.rb
- spec/lib/gitlab/markdown/issue_reference_filter_spec.rb 4 additions, 4 deletionsspec/lib/gitlab/markdown/issue_reference_filter_spec.rb
Loading
| Loading
| @@ -329,14 +329,18 @@ class Project < ActiveRecord::Base |
self.id | ||
end | ||
def issue_exists?(issue_id) | ||
def get_issue(issue_id) | ||
if default_issues_tracker? | ||
self.issues.where(iid: issue_id).first.present? | ||
issues.find_by(iid: issue_id) | ||
else | ||
true | ||
ExternalIssue.new(issue_id, self) | ||
end | ||
end | ||
def issue_exists?(issue_id) | ||
get_issue(issue_id).present? | ||
end | ||
def default_issue_tracker | ||
gitlab_issue_tracker_service || create_gitlab_issue_tracker_service | ||
end | ||
Loading
| Loading
| @@ -350,11 +354,7 @@ class Project < ActiveRecord::Base |
end | ||
def default_issues_tracker? | ||
if external_issue_tracker | ||
false | ||
else | ||
true | ||
end | ||
external_issue_tracker.blank? | ||
|
||
end | ||
def external_issues_trackers | ||
Loading
| Loading
|