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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d16d2582
Commit
d16d2582
authored
Dec 02, 2019
by
Alexandru Croitor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retrieve issues from subgroups when rendering group milestone
parent
9c42325d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
app/models/milestone.rb
app/models/milestone.rb
+1
-1
changelogs/unreleased/36205-issues-in-group-milestones.yml
changelogs/unreleased/36205-issues-in-group-milestones.yml
+5
-0
spec/models/concerns/milestoneish_spec.rb
spec/models/concerns/milestoneish_spec.rb
+17
-0
No files found.
app/models/milestone.rb
View file @
d16d2582
...
...
@@ -341,6 +341,6 @@ class Milestone < ApplicationRecord
end
def
issues_finder_params
{
project_id:
project_id
,
group_id:
group_id
}.
compact
{
project_id:
project_id
,
group_id:
group_id
,
include_subgroups:
group_id
.
present?
}.
compact
end
end
changelogs/unreleased/36205-issues-in-group-milestones.yml
0 → 100644
View file @
d16d2582
---
title
:
Retrieve issues from subgroups when rendering group milestone
merge_request
:
21024
author
:
type
:
fixed
spec/models/concerns/milestoneish_spec.rb
View file @
d16d2582
...
...
@@ -192,6 +192,23 @@ describe Milestone, 'Milestoneish' do
end
end
end
context
'when milestone is at parent level group'
do
let
(
:parent_group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
,
parent:
parent_group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
(
:milestone
)
{
create
(
:milestone
,
group:
parent_group
)
}
it
'does not return any merge request for a non member'
do
merge_requests
=
milestone
.
merge_requests_visible_to_user
(
non_member
)
expect
(
merge_requests
).
to
be_empty
end
it
'returns milestone merge requests for a member'
do
merge_requests
=
milestone
.
merge_requests_visible_to_user
(
member
)
expect
(
merge_requests
).
to
contain_exactly
(
merge_request
)
end
end
end
describe
'#complete?'
do
...
...
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