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
2f4dc45d
Commit
2f4dc45d
authored
Apr 11, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with dashboard/issues not filtering by milestone
Closes #15128
parent
85279c07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
1 deletion
+61
-1
app/assets/javascripts/milestone_select.js.coffee
app/assets/javascripts/milestone_select.js.coffee
+7
-1
spec/features/dashboard_issues_spec.rb
spec/features/dashboard_issues_spec.rb
+54
-0
No files found.
app/assets/javascripts/milestone_select.js.coffee
View file @
2f4dc45d
...
...
@@ -85,15 +85,21 @@ class @MilestoneSelect
# display:block overrides the hide-collapse rule
$value
.
removeAttr
(
'style'
)
clicked
:
(
selected
)
->
page
=
$
(
'body'
).
data
'page'
isIssueIndex
=
page
is
'projects:issues:index'
isMRIndex
=
page
is
page
is
'projects:merge_requests:index'
if
$dropdown
.
hasClass
'js-filter-bulk-update'
return
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
and
(
isIssueIndex
or
isMRIndex
)
if
selected
.
name
?
selectedMilestone
=
selected
.
name
else
selectedMilestone
=
''
Issues
.
filterResults
$dropdown
.
closest
(
'form'
)
else
if
$dropdown
.
hasClass
(
'js-filter-submit'
)
$dropdown
.
closest
(
'form'
).
submit
()
else
selected
=
$selectbox
.
find
(
'input[type="hidden"]'
)
...
...
spec/features/dashboard_issues_spec.rb
0 → 100644
View file @
2f4dc45d
require
'spec_helper'
describe
"Dashboard Issues filtering"
,
feature:
true
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
context
'filtering by milestone'
do
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
create
(
:issue
,
project:
project
,
author:
user
,
assignee:
user
)
create
(
:issue
,
project:
project
,
author:
user
,
assignee:
user
,
milestone:
milestone
)
visit_issues
end
it
'should show all issues with no milestone'
do
show_milestone_dropdown
click_link
'No Milestone'
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
1
)
end
it
'should show all issues with any milestone'
do
show_milestone_dropdown
click_link
'Any Milestone'
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
2
)
end
it
'should show all issues with the selected milestone'
do
show_milestone_dropdown
page
.
within
'.dropdown-content'
do
click_link
milestone
.
title
end
expect
(
page
).
to
have_selector
(
'.issue'
,
count:
1
)
end
end
def
show_milestone_dropdown
click_button
'Milestone'
expect
(
page
).
to
have_selector
(
'.dropdown-content'
,
visible:
true
)
end
def
visit_issues
visit
issues_dashboard_path
end
end
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