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

Searching for issue/mr by iid in markdown

parent b6f1a4ce0ac1
......@@ -201,7 +201,7 @@ def issues_labels
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 @@ def reference_issue(identifier)
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