BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cd6c3adf
Commit
cd6c3adf
authored
Aug 12, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted milestone upcoming default filter
parent
f4c9d514
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
35 deletions
+26
-35
boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+1
-1
issuables_helper.rb
app/helpers/issuables_helper.rb
+2
-6
show.html.haml
app/views/projects/boards/show.html.haml
+1
-1
_milestone_dropdown.html.haml
app/views/shared/issuable/_milestone_dropdown.html.haml
+1
-5
boards_spec.rb
spec/features/boards/boards_spec.rb
+21
-22
No files found.
app/assets/javascripts/boards/stores/boards_store.js.es6
View file @
cd6c3adf
...
...
@@ -7,7 +7,7 @@
this.state.filters = {
author_id: gl.utils.getParameterValues('author_id')[0],
assignee_id: gl.utils.getParameterValues('assignee_id')[0],
milestone_title: gl.utils.getParameterValues('milestone_title')[0]
|| '#upcoming'
,
milestone_title: gl.utils.getParameterValues('milestone_title')[0],
label_name: gl.utils.getParameterValues('label_name[]')
};
},
...
...
app/helpers/issuables_helper.rb
View file @
cd6c3adf
...
...
@@ -49,16 +49,12 @@ module IssuablesHelper
end
end
def
milestone_dropdown_label
(
milestone_title
,
is_boards
,
default_label
=
"Milestone"
)
def
milestone_dropdown_label
(
milestone_title
,
default_label
=
"Milestone"
)
if
milestone_title
==
Milestone
::
Upcoming
.
name
milestone_title
=
Milestone
::
Upcoming
.
title
end
if
is_boards
boards_default
=
Milestone
::
Upcoming
.
title
end
h
(
milestone_title
.
presence
||
boards_default
||
default_label
)
h
(
milestone_title
.
presence
||
default_label
)
end
def
issuable_meta
(
issuable
,
project
,
text
)
...
...
app/views/projects/boards/show.html.haml
View file @
cd6c3adf
...
...
@@ -4,7 +4,7 @@
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_tag
(
'boards/boards_bundle.js'
)
=
page_specific_javascript_tag
(
'boards/test_utils/simulate_drag.js'
)
=
page_specific_javascript_tag
(
'boards/test_utils/simulate_drag.js'
)
if
Rails
.
env
.
test?
=
render
"projects/issues/head"
...
...
app/views/shared/issuable/_milestone_dropdown.html.haml
View file @
cd6c3adf
-
is_boards
=
controller
.
controller_name
==
'boards'
-
if
params
[
:milestone_title
].
present?
=
hidden_field_tag
(
:milestone_title
,
params
[
:milestone_title
])
-
elsif
is_boards
=
hidden_field_tag
(
:milestone_title
,
Milestone
::
Upcoming
.
name
)
=
dropdown_tag
(
milestone_dropdown_label
(
params
[
:milestone_title
],
is_boards
),
options:
{
title:
"Filter by milestone"
,
toggle_class:
'js-milestone-select js-filter-submit'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
=
dropdown_tag
(
milestone_dropdown_label
(
params
[
:milestone_title
]),
options:
{
title:
"Filter by milestone"
,
toggle_class:
'js-milestone-select js-filter-submit'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
placeholder:
"Search milestones"
,
footer_content:
@project
.
present?
,
data:
{
show_no:
true
,
show_any:
true
,
show_upcoming:
true
,
field_name:
"milestone_title"
,
selected:
params
[
:milestone_title
],
project_id:
@project
.
try
(
:id
),
milestones:
milestones_filter_dropdown_path
,
default_label:
"Milestone"
}
})
do
-
if
@project
%ul
.dropdown-footer-list
...
...
spec/features/boards/boards_spec.rb
View file @
cd6c3adf
...
...
@@ -44,7 +44,6 @@ describe 'Issue Boards', feature: true, js: true do
end
context
'with lists'
do
let!
(
:milestone_upcoming
)
{
create
(
:milestone
,
project:
project
,
due_date:
Date
.
tomorrow
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let
(
:planning
)
{
create
(
:label
,
project:
project
,
name:
'Planning'
)
}
...
...
@@ -55,16 +54,16 @@ describe 'Issue Boards', feature: true, js: true do
let!
(
:list1
)
{
create
(
:list
,
board:
project
.
board
,
label:
planning
,
position:
0
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
project
.
board
,
label:
development
,
position:
1
)
}
let!
(
:confidential_issue
)
{
create
(
:issue
,
:confidential
,
project:
project
,
author:
user
,
milestone:
milestone_upcoming
)
}
let!
(
:issue1
)
{
create
(
:issue
,
project:
project
,
assignee:
user
,
milestone:
milestone_upcoming
)
}
let!
(
:issue2
)
{
create
(
:issue
,
project:
project
,
author:
user2
,
milestone:
milestone_upcoming
)
}
let!
(
:issue3
)
{
create
(
:issue
,
project:
project
,
milestone:
milestone_upcoming
)
}
let!
(
:issue4
)
{
create
(
:issue
,
project:
project
,
milestone:
milestone_upcoming
)
}
let!
(
:confidential_issue
)
{
create
(
:issue
,
:confidential
,
project:
project
,
author:
user
)
}
let!
(
:issue1
)
{
create
(
:issue
,
project:
project
,
assignee:
user
)
}
let!
(
:issue2
)
{
create
(
:issue
,
project:
project
,
author:
user2
)
}
let!
(
:issue3
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:issue4
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:issue5
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
],
milestone:
milestone
)
}
let!
(
:issue6
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
,
development
]
,
milestone:
milestone_upcoming
)
}
let!
(
:issue7
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
]
,
milestone:
milestone_upcoming
)
}
let!
(
:issue6
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
,
development
])
}
let!
(
:issue7
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
])
}
let!
(
:issue8
)
{
create
(
:closed_issue
,
project:
project
,
milestone:
milestone_upcoming
)
}
let!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
,
bug
]
,
milestone:
milestone_upcoming
)
}
let!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
,
bug
])
}
before
do
visit
namespace_project_board_path
(
project
.
namespace
,
project
)
...
...
@@ -78,8 +77,8 @@ describe 'Issue Boards', feature: true, js: true do
it
'shows issues in lists'
do
page
.
within
(
all
(
'.board'
)[
1
])
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
1
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
2
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
2
)
end
page
.
within
(
all
(
'.board'
)[
2
])
do
...
...
@@ -103,7 +102,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'infinite scrolls list'
do
50
.
times
do
create
(
:issue
,
project:
project
,
milestone:
milestone_upcoming
)
create
(
:issue
,
project:
project
)
end
visit
namespace_project_board_path
(
project
.
namespace
,
project
)
...
...
@@ -157,8 +156,8 @@ describe 'Issue Boards', feature: true, js: true do
end
page
.
within
(
all
(
'.board'
)[
1
])
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
2
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
3
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
3
)
end
end
end
...
...
@@ -179,7 +178,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'removes all of the same issue to done'
do
drag_to
(
list_from_index:
1
,
list_to_index:
3
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
all
(
'.board'
)[
2
]).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
all
(
'.board'
).
last
).
to
have_content
(
issue6
.
title
)
expect
(
all
(
'.board'
).
last
).
not_to
have_content
(
planning
.
title
)
...
...
@@ -195,10 +194,10 @@ describe 'Issue Boards', feature: true, js: true do
end
it
'moves between lists'
do
drag_to
(
list_from_index:
1
,
list_to_index:
2
)
drag_to
(
list_from_index:
1
,
card_index:
1
,
list_to_index:
2
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
0
)
expect
(
all
(
'.board'
)[
2
]).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
all
(
'.board'
)[
2
]).
to
have_selector
(
'.card'
,
count:
3
)
expect
(
all
(
'.board'
)[
2
]).
to
have_content
(
issue6
.
title
)
expect
(
all
(
'.board'
)[
2
].
all
(
'.card'
).
last
).
not_to
have_content
(
development
.
title
)
end
...
...
@@ -206,7 +205,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'moves between lists'
do
drag_to
(
list_from_index:
2
,
list_to_index:
1
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
3
)
expect
(
all
(
'.board'
)[
2
]).
to
have_selector
(
'.card'
,
count:
1
)
expect
(
all
(
'.board'
)[
1
]).
to
have_content
(
issue7
.
title
)
expect
(
all
(
'.board'
)[
1
].
all
(
'.card'
).
first
).
not_to
have_content
(
planning
.
title
)
...
...
@@ -215,7 +214,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'moves from done'
do
drag_to
(
list_from_index:
3
,
list_to_index:
1
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
2
)
expect
(
all
(
'.board'
)[
1
]).
to
have_selector
(
'.card'
,
count:
3
)
expect
(
all
(
'.board'
)[
1
]).
to
have_content
(
issue8
.
title
)
end
...
...
@@ -315,7 +314,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'filters by milestone'
do
page
.
within
'.issues-filters'
do
click_button
(
'
Upcoming
'
)
click_button
(
'
Milestone
'
)
page
.
within
'.milestone-filter'
do
click_link
(
milestone
.
title
)
...
...
@@ -358,7 +357,7 @@ describe 'Issue Boards', feature: true, js: true do
it
'infinite scrolls list with label filter'
do
50
.
times
do
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
]
,
milestone:
milestone_upcoming
)
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
])
end
page
.
within
'.issues-filters'
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