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
f8da5eb8
Commit
f8da5eb8
authored
Oct 05, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Label list shows all issues (opened or closed) with that label"
parent
8a96910c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
13 deletions
+9
-13
app/services/boards/issues/list_service.rb
app/services/boards/issues/list_service.rb
+1
-6
doc/user/project/issue_board.md
doc/user/project/issue_board.md
+4
-3
spec/services/boards/issues/list_service_spec.rb
spec/services/boards/issues/list_service_spec.rb
+4
-4
No files found.
app/services/boards/issues/list_service.rb
View file @
f8da5eb8
...
...
@@ -36,12 +36,7 @@ module Boards
end
def
set_state
params
[
:state
]
=
case
list
.
list_type
.
to_sym
when
:backlog
then
'opened'
when
:done
then
'closed'
else
'all'
end
params
[
:state
]
=
list
.
done?
?
'closed'
:
'opened'
end
def
board_label_ids
...
...
doc/user/project/issue_board.md
View file @
f8da5eb8
...
...
@@ -31,9 +31,10 @@ Below is a table of the definitions used for GitLab's Issue Board.
There are three types of lists, the ones you create based on your labels, and
two default:
-
**Backlog**
(default): shows all opened issues that do not fall in one of the other lists. Always appears on the very left.
-
**Done**
(default): shows all closed issues that do not fall in one of the other lists. Always appears on the very right.
-
Label list: a list based on a label. It shows all opened or closed issues with that label.
-
**Backlog**
(default): shows all issues that do not fall in one of the other lists. Always appears on the very left.
-
**Done**
(default): shows all closed issues. Always appears on the very right.
Label list: a list based on a label. It shows all issues with that label.
-
Label list: a list based on a label. It shows all opened issues with that label.
![
GitLab Issue Board
](
img/issue_board.png
)
...
...
spec/services/boards/issues/list_service_spec.rb
View file @
f8da5eb8
...
...
@@ -30,7 +30,7 @@ describe Boards::Issues::ListService, services: true do
let!
(
:closed_issue1
)
{
create
(
:labeled_issue
,
:closed
,
project:
project
,
labels:
[
bug
])
}
let!
(
:closed_issue2
)
{
create
(
:labeled_issue
,
:closed
,
project:
project
,
labels:
[
p3
])
}
let!
(
:closed_issue3
)
{
create
(
:issue
,
:closed
,
project:
project
)
}
let!
(
:closed_issue4
)
{
create
(
:labeled_issue
,
:closed
,
project:
project
,
labels:
[
p1
,
development
])
}
let!
(
:closed_issue4
)
{
create
(
:labeled_issue
,
:closed
,
project:
project
,
labels:
[
p1
])
}
before
do
project
.
team
<<
[
user
,
:developer
]
...
...
@@ -58,15 +58,15 @@ describe Boards::Issues::ListService, services: true do
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
expect
(
issues
).
to
eq
[
closed_issue2
,
closed_issue3
,
closed_issue1
]
expect
(
issues
).
to
eq
[
closed_issue
4
,
closed_issue
2
,
closed_issue3
,
closed_issue1
]
end
it
'returns opened
/closed
issues that have label list applied when listing issues from a label list'
do
it
'returns opened issues that have label list applied when listing issues from a label list'
do
params
=
{
id:
list1
.
id
}
issues
=
described_class
.
new
(
project
,
user
,
params
).
execute
expect
(
issues
).
to
eq
[
closed_issue4
,
list1_issue3
,
list1_issue1
,
list1_issue2
]
expect
(
issues
).
to
eq
[
list1_issue3
,
list1_issue1
,
list1_issue2
]
end
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