diff options
author | James Lopez <james@jameslopez.es> | 2016-12-21 19:41:33 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-03 15:01:46 +0300 |
commit | 112f47057275312daa876bee5bd74d5464410bc5 (patch) | |
tree | 257495d658a39b8e31c3407498ec248cb97976a6 /app/models/milestone.rb | |
parent | de25604fbca2f7005754d821d571bbcb1cc510ac (diff) |
Fix cross-project references copy to include the project reference
Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r-- | app/models/milestone.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index 0dcfec89f14..8a11f47dd67 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -118,11 +118,11 @@ class Milestone < ActiveRecord::Base # Milestone.first.to_reference(cross_namespace_project) # => "gitlab-org/gitlab-ce%1" # Milestone.first.to_reference(same_namespace_project) # => "gitlab-ce%1" # - def to_reference(from_project = nil, format: :iid) + def to_reference(from_project = nil, format: :iid, full: false) format_reference = milestone_format_reference(format) reference = "#{self.class.reference_prefix}#{format_reference}" - "#{project.to_reference(from_project)}#{reference}" + "#{project.to_reference(from_project, full: full)}#{reference}" end def reference_link_text(from_project = nil) |