Commit 9acaec7a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Searching for issue/mr by iid in markdown

parent a73e068c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment