diff options
author | Jeff Stubler <brunsa2@gmail.com> | 2016-10-26 03:03:42 +0300 |
---|---|---|
committer | Jeff Stubler <brunsa2@gmail.com> | 2017-04-26 02:57:08 +0300 |
commit | a78eeefd6e76c956751a2a7f03efeaee28f83b46 (patch) | |
tree | 1216d2d6f63dafa0313c65156a45b2a0b192acc3 /app/helpers/merge_requests_helper.rb | |
parent | 1af9dfb8a8b163d70a8631a6cbb564709d5a3730 (diff) |
Change issues sentence to use natural sorting
Diffstat (limited to 'app/helpers/merge_requests_helper.rb')
-rw-r--r-- | app/helpers/merge_requests_helper.rb | 9 |
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 |