diff options
author | Jeff Stubler <brunsa2@gmail.com> | 2017-01-08 17:09:00 -0600 |
---|---|---|
committer | Jeff Stubler <brunsa2@gmail.com> | 2018-02-13 07:47:09 -0600 |
commit | 9abbe3cc860f5838df76405e59830efdacb07047 (patch) | |
tree | dcdb5b75689d3feca4f760f91e0fde084f37f2cd /app/services/issues | |
parent | 5b73e0eb35f5b9b78c228a4867ef78538ef05653 (diff) | |
download | gitlab-ce-9abbe3cc860f5838df76405e59830efdacb07047.tar.gz |
Change issue show page to group MRs by projects and namespaces
Closes #26466.
Diffstat (limited to 'app/services/issues')
-rw-r--r-- | app/services/issues/fetch_referenced_merge_requests_service.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/services/issues/fetch_referenced_merge_requests_service.rb b/app/services/issues/fetch_referenced_merge_requests_service.rb new file mode 100644 index 00000000000..39c8ded9df4 --- /dev/null +++ b/app/services/issues/fetch_referenced_merge_requests_service.rb @@ -0,0 +1,12 @@ +module Issues + class FetchReferencedMergeRequestsService < Issues::BaseService + def execute(issue) + referenced_merge_requests = issue.referenced_merge_requests(current_user) + referenced_merge_requests = Gitlab::IssuableSorter.sort(project, referenced_merge_requests) { |i| i.iid.to_s } + closed_by_merge_requests = issue.closed_by_merge_requests(current_user) + closed_by_merge_requests = Gitlab::IssuableSorter.sort(project, closed_by_merge_requests) { |i| i.iid.to_s } + + [referenced_merge_requests, closed_by_merge_requests] + end + end +end |