diff options
Diffstat (limited to 'app/models/group_milestone.rb')
-rw-r--r-- | app/models/group_milestone.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/models/group_milestone.rb b/app/models/group_milestone.rb index 0faff39ae7a..45222f5329e 100644 --- a/app/models/group_milestone.rb +++ b/app/models/group_milestone.rb @@ -65,16 +65,12 @@ class GroupMilestone state == 'closed' end - def opened_unassigned_issues - milestones.map{ |milestone| milestone.issues.opened.unassigned } + def issues + milestones.map{ |milestone| milestone.issues }.flatten.group_by(&:state) end - def opened_assigned_issues - milestones.map{ |milestone| milestone.issues.opened.assigned } - end - - def closed_issues - milestones.map{ |milestone| milestone.issues.closed } + def merge_requests + milestones.map{ |milestone| milestone.merge_requests }.flatten.group_by(&:state) end def participants |