Searching for issue/mr by iid in markdown
This commit is contained in:
parent
a73e068c06
commit
9acaec7a26
2 changed files with 2 additions and 2 deletions
|
@ -201,7 +201,7 @@ class Project < ActiveRecord::Base
|
|||
|
||||
def issue_exists?(issue_id)
|
||||
if used_default_issues_tracker?
|
||||
self.issues.where(id: issue_id).first.present?
|
||||
self.issues.where(iid: issue_id).first.present?
|
||||
else
|
||||
true
|
||||
end
|
||||
|
|
|
@ -181,7 +181,7 @@ module Gitlab
|
|||
end
|
||||
|
||||
def reference_merge_request(identifier)
|
||||
if merge_request = @project.merge_requests.where(id: identifier).first
|
||||
if merge_request = @project.merge_requests.where(iid: identifier).first
|
||||
link_to("!#{identifier}", project_merge_request_url(@project, merge_request), html_options.merge(title: "Merge Request: #{merge_request.title}", class: "gfm gfm-merge_request #{html_options[:class]}"))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue