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
19afb1e7
Commit
19afb1e7
authored
Aug 12, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with creating new list from Backlog or done label
parent
cd6c3adf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
+27
-5
app/assets/javascripts/boards/stores/boards_store.js.es6
app/assets/javascripts/boards/stores/boards_store.js.es6
+3
-3
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+23
-1
spec/javascripts/boards/boards_store_spec.js.es6
spec/javascripts/boards/boards_store_spec.js.es6
+1
-1
No files found.
app/assets/javascripts/boards/stores/boards_store.js.es6
View file @
19afb1e7
...
...
@@ -19,7 +19,7 @@
},
new (listObj) {
const list = this.addList(listObj),
backlogList = this.findList('type', 'backlog');
backlogList = this.findList('type', 'backlog'
, 'backlog'
);
list
.save()
...
...
@@ -123,9 +123,9 @@
listFrom.removeIssue(issue);
}
},
findList (key, val) {
findList (key, val
, type = 'label'
) {
return this.state.lists.filter((list) => {
return list[key] === val;
return list[key] === val
&& list['type'] === type
;
})[0];
},
updateFiltersUrl () {
...
...
spec/features/boards/boards_spec.rb
View file @
19afb1e7
...
...
@@ -50,6 +50,8 @@ describe 'Issue Boards', feature: true, js: true do
let
(
:development
)
{
create
(
:label
,
project:
project
,
name:
'Development'
)
}
let
(
:testing
)
{
create
(
:label
,
project:
project
,
name:
'Testing'
)
}
let
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
let!
(
:backlog
)
{
create
(
:label
,
project:
project
,
name:
'Backlog'
)
}
let!
(
:done
)
{
create
(
:label
,
project:
project
,
name:
'Done'
)
}
let!
(
:list1
)
{
create
(
:list
,
board:
project
.
board
,
label:
planning
,
position:
0
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
project
.
board
,
label:
development
,
position:
1
)
}
...
...
@@ -62,7 +64,7 @@ describe 'Issue Boards', feature: true, js: true do
let!
(
:issue5
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
],
milestone:
milestone
)
}
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!
(
:issue8
)
{
create
(
:closed_issue
,
project:
project
)
}
let!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
testing
,
bug
])
}
before
do
...
...
@@ -247,6 +249,26 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
end
it
'creates new list for Backlog label'
do
click_button
'Create new list'
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
backlog
.
title
end
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
end
it
'creates new list for Done label'
do
click_button
'Create new list'
page
.
within
(
'.dropdown-menu-issues-board-new'
)
do
click_link
done
.
title
end
expect
(
page
).
to
have_selector
(
'.board'
,
count:
5
)
end
it
'moves issues from backlog into new list'
do
page
.
within
(
first
(
'.board'
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'6'
)
...
...
spec/javascripts/boards/boards_store_spec.js.es6
View file @
19afb1e7
...
...
@@ -104,7 +104,7 @@
it('adds the blank state', () => {
BoardsStore.addBlankState();
const list = BoardsStore.findList('type', 'blank');
const list = BoardsStore.findList('type', 'blank'
, 'blank'
);
expect(list).toBeDefined();
});
...
...
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