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
489b42f0
Commit
489b42f0
authored
Mar 28, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Multiple Issue Assignees] Fix of issues export[ci skip]
parent
d754c1fa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
app/services/issues/export_csv_service.rb
app/services/issues/export_csv_service.rb
+3
-3
spec/services/issues/export_csv_service_spec.rb
spec/services/issues/export_csv_service_spec.rb
+3
-3
No files found.
app/services/issues/export_csv_service.rb
View file @
489b42f0
...
...
@@ -21,7 +21,7 @@ module Issues
def
csv_builder
@csv_builder
||=
CsvBuilder
.
new
(
@issues
.
includes
(
:author
,
:assignee
),
header_to_value_hash
)
CsvBuilder
.
new
(
@issues
.
includes
(
:author
,
:assignee
s
),
header_to_value_hash
)
end
private
...
...
@@ -35,8 +35,8 @@ module Issues
'Description'
=>
'description'
,
'Author'
=>
'author_name'
,
'Author Username'
=>
->
(
issue
)
{
issue
.
author
&
.
username
},
'Assignee'
=>
'assignee_name'
,
'Assignee Username'
=>
->
(
issue
)
{
issue
.
assignee
_list
},
'Assignee'
=>
->
(
issue
)
{
issue
.
assignees
.
pluck
(
:name
).
join
(
', '
)
}
,
'Assignee Username'
=>
->
(
issue
)
{
issue
.
assignee
s
.
pluck
(
:username
).
join
(
', '
)
},
'Confidential'
=>
->
(
issue
)
{
issue
.
confidential?
?
'Yes'
:
'No'
},
'Due Date'
=>
->
(
issue
)
{
issue
.
due_date
&
.
to_s
(
:csv
)
},
'Created At (UTC)'
=>
->
(
issue
)
{
issue
.
created_at
&
.
to_s
(
:csv
)
},
...
...
spec/services/issues/export_csv_service_spec.rb
View file @
489b42f0
...
...
@@ -33,7 +33,7 @@ describe Issues::ExportCsvService, services: true do
before
do
issue
.
update!
(
milestone:
milestone
,
assignee
:
user
,
assignee
s:
[
user
]
,
description:
'Issue with details'
,
state: :reopened
,
due_date:
DateTime
.
new
(
2014
,
3
,
2
),
...
...
@@ -71,11 +71,11 @@ describe Issues::ExportCsvService, services: true do
end
specify
'assignee name'
do
expect
(
csv
[
0
][
'Assignee'
]).
to
eq
issue
.
assignee_
name
expect
(
csv
[
0
][
'Assignee'
]).
to
eq
user
.
name
end
specify
'assignee username'
do
expect
(
csv
[
0
][
'Assignee Username'
]).
to
eq
issue
.
assignee
.
username
expect
(
csv
[
0
][
'Assignee Username'
]).
to
eq
user
.
username
end
specify
'confidential'
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