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
Jérome Perrin
gitlab-ce
Commits
3bfb94b7
Commit
3bfb94b7
authored
Aug 24, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Label list shows all issues (opened or closed) with that label
parent
7bbb523b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
app/services/boards/issues/list_service.rb
app/services/boards/issues/list_service.rb
+6
-1
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 @
3bfb94b7
...
...
@@ -36,7 +36,12 @@ module Boards
end
def
set_state
params
[
:state
]
=
list
.
done?
?
'closed'
:
'opened'
params
[
:state
]
=
case
list
.
list_type
.
to_sym
when
:backlog
then
'opened'
when
:done
then
'closed'
else
'all'
end
end
def
board_label_ids
...
...
spec/services/boards/issues/list_service_spec.rb
View file @
3bfb94b7
...
...
@@ -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
])
}
let!
(
:closed_issue4
)
{
create
(
:labeled_issue
,
:closed
,
project:
project
,
labels:
[
p1
,
development
])
}
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_issue
4
,
closed_issue
2
,
closed_issue3
,
closed_issue1
]
expect
(
issues
).
to
eq
[
closed_issue2
,
closed_issue3
,
closed_issue1
]
end
it
'returns opened issues that have label list applied when listing issues from a label list'
do
it
'returns opened
/closed
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
[
list1_issue3
,
list1_issue1
,
list1_issue2
]
expect
(
issues
).
to
eq
[
closed_issue4
,
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