summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-04-26 09:40:12 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-04-26 09:40:12 +0000
commit3ff8d8020e495df319f0b0921bc94b1c3470f6f0 (patch)
tree088b1e58e8eba3aad4ee45e19993897eb2cf5b4f /app
parentf2da2df43a6901061a7e6b861c79025644d3b469 (diff)
parenta78eeefd6e76c956751a2a7f03efeaee28f83b46 (diff)
downloadgitlab-ce-3ff8d8020e495df319f0b0921bc94b1c3470f6f0.tar.gz
Merge branch '20378-natural-sort-issue-numbers' into 'master'
Change issues sentence to use natural sorting Closes #20378 See merge request !7110
Diffstat (limited to 'app')
-rw-r--r--app/helpers/merge_requests_helper.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 38be073c8dc..e347f61fb8d 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -56,11 +56,12 @@ module MergeRequestsHelper
end
def issues_sentence(issues)
- # Sorting based on the `#123` or `group/project#123` reference will sort
- # local issues first.
- issues.map do |issue|
+ # Issuable sorter will sort local issues, then issues from the same
+ # namespace, then all other issues.
+ issues = Gitlab::IssuableSorter.sort(@project, issues).map do |issue|
issue.to_reference(@project)
- end.sort.to_sentence
+ end
+ issues.to_sentence
end
def mr_closes_issues