Commit c85c6815 authored by Berna Castro's avatar Berna Castro Committed by Oswaldo Ferreira

Add the group path to the issue ID if applicable

parent 4e2b9d70
...@@ -591,10 +591,18 @@ class Project < ActiveRecord::Base ...@@ -591,10 +591,18 @@ class Project < ActiveRecord::Base
end end
end end
def to_reference(from_project = nil, full: false) def to_reference(from_project = nil, from_group = nil)
if full || cross_namespace_reference?(from_project) if from_group.nil?
path_with_namespace if cross_namespace_reference?(from_project)
elsif cross_project_reference?(from_project) path_with_namespace
elsif cross_project_reference?(from_project)
path
elsif self == from_project
nil
else
path_with_namespace
end
else
path path
end end
end end
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
= note_count = note_count
.issue-info .issue-info
#{issue.to_reference} &middot; #{issue.to_reference(@project, @group)} &middot;
opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')}
by #{link_to_member(@project, issue.author, avatar: false)} by #{link_to_member(@project, issue.author, avatar: false)}
- if issue.milestone - if issue.milestone
......
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