Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
58ecb06f
Commit
58ecb06f
authored
Feb 05, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicates from group milestone participants list.
parent
0a9cab4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
CHANGELOG
CHANGELOG
+1
-1
app/models/group_milestone.rb
app/models/group_milestone.rb
+3
-3
No files found.
CHANGELOG
View file @
58ecb06f
...
@@ -49,7 +49,7 @@ v 7.8.0
...
@@ -49,7 +49,7 @@ v 7.8.0
-
-
- Add action property to merge request hook (Julien Bianchi)
- Add action property to merge request hook (Julien Bianchi)
-
-
-
-
Remove duplicates from group milestone participants list.
-
-
-
-
- Add a new API function that retrieves all issues assigned to a single milestone (Justin Whear and Hannes Rosenögger)
- Add a new API function that retrieves all issues assigned to a single milestone (Justin Whear and Hannes Rosenögger)
...
...
app/models/group_milestone.rb
View file @
58ecb06f
...
@@ -66,15 +66,15 @@ class GroupMilestone
...
@@ -66,15 +66,15 @@ class GroupMilestone
end
end
def
issues
def
issues
@group_issues
||=
milestones
.
map
{
|
milestone
|
milestone
.
issues
}
.
flatten
.
group_by
(
&
:state
)
@group_issues
||=
milestones
.
map
(
&
:issues
)
.
flatten
.
group_by
(
&
:state
)
end
end
def
merge_requests
def
merge_requests
@group_merge_requests
||=
milestones
.
map
{
|
milestone
|
milestone
.
merge_requests
}
.
flatten
.
group_by
(
&
:state
)
@group_merge_requests
||=
milestones
.
map
(
&
:merge_requests
)
.
flatten
.
group_by
(
&
:state
)
end
end
def
participants
def
participants
milestones
.
map
{
|
milestone
|
milestone
.
participants
.
uniq
}.
reject
(
&
:empty?
).
flatten
@group_participants
||=
milestones
.
map
(
&
:participants
).
flatten
.
compact
.
uniq
end
end
def
opened_issues
def
opened_issues
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment