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
Boxiang Sun
gitlab-ce
Commits
3b70cf69
Commit
3b70cf69
authored
Oct 26, 2018
by
Eagllus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update MR based on Sean's feedback
parent
0ff5b0f4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/controllers/dashboard/milestones_controller.rb
app/controllers/dashboard/milestones_controller.rb
+1
-1
changelogs/unreleased/rz_fix_milestone_count.yml
changelogs/unreleased/rz_fix_milestone_count.yml
+1
-1
spec/models/milestone_spec.rb
spec/models/milestone_spec.rb
+5
-5
No files found.
app/controllers/dashboard/milestones_controller.rb
View file @
3b70cf69
...
...
@@ -10,7 +10,7 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController
def
index
respond_to
do
|
format
|
format
.
html
do
@milestone_states
=
Milestone
.
states_count
(
@projects
,
@groups
)
@milestone_states
=
Milestone
.
states_count
(
@projects
.
select
(
:id
),
@groups
.
select
(
:id
)
)
@milestones
=
Kaminari
.
paginate_array
(
milestones
).
page
(
params
[
:page
])
end
format
.
json
do
...
...
changelogs/unreleased/rz_fix_milestone_count.yml
View file @
3b70cf69
---
title
:
Fixing count on Milestones
merge_request
:
21446
author
:
eagllus
author
:
type
:
fixed
spec/models/milestone_spec.rb
View file @
3b70cf69
...
...
@@ -351,12 +351,12 @@ describe Milestone do
describe
'.states_count'
do
context
'when the projects have milestones'
do
let
(
:project_1
)
{
create
(
:project
)
}
let
(
:project_2
)
{
create
(
:project
)
}
let
(
:group_1
)
{
create
(
:group
)
}
let
(
:group_2
)
{
create
(
:group
)
}
before
do
project_1
=
create
(
:project
)
project_2
=
create
(
:project
)
group_1
=
create
(
:group
)
group_2
=
create
(
:group
)
create
(
:active_milestone
,
title:
'Active Group Milestone'
,
project:
project_1
)
create
(
:closed_milestone
,
title:
'Closed Group Milestone'
,
project:
project_1
)
create
(
:active_milestone
,
title:
'Active Group Milestone'
,
project:
project_2
)
...
...
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