diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-06-26 09:41:36 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-06-30 09:44:30 +0200 |
commit | 8e8c074205f4c85238309f4e21e80748f09d0ec8 (patch) | |
tree | 878245ef5b9b5293573d34ec7535989da5e37114 /app/services/milestones | |
parent | 58570880f0ffde173de31a0093f6a9d243467fef (diff) | |
download | gitlab-ce-8e8c074205f4c85238309f4e21e80748f09d0ec8.tar.gz |
Reuse existing milestones counting.
Diffstat (limited to 'app/services/milestones')
-rw-r--r-- | app/services/milestones/group_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/milestones/group_service.rb b/app/services/milestones/group_service.rb index 1655100e012..74bf126652e 100644 --- a/app/services/milestones/group_service.rb +++ b/app/services/milestones/group_service.rb @@ -44,11 +44,11 @@ module Milestones end def open_items_count - open_issues_count.merge(open_mr_count){ |title,issue,mr| issue + mr } + @project_milestones.merge(@project_milestones){ |title, milestone| milestone.map{|m| m.open_items_count }.sum } end def closed_items_count - closed_issues_count.merge(close_mr_count){ |title,issue,mr| issue + mr } + @project_milestones.merge(@project_milestones){ |title, milestone| milestone.map{|m| m.closed_items_count }.sum } end def total_items_count |