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
c75bf8af
Commit
c75bf8af
authored
Jun 07, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sh-support-closed-at-csv' into 'master'
Add closed_at field to issue CSV export See merge request !2052
parents
615075e1
63eca8ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
app/services/issues/export_csv_service.rb
app/services/issues/export_csv_service.rb
+1
-0
changelogs/unreleased-ee/sh-support-closed-at-csv.yml
changelogs/unreleased-ee/sh-support-closed-at-csv.yml
+4
-0
spec/services/issues/export_csv_service_spec.rb
spec/services/issues/export_csv_service_spec.rb
+5
-0
No files found.
app/services/issues/export_csv_service.rb
View file @
c75bf8af
...
...
@@ -41,6 +41,7 @@ module Issues
'Due Date'
=>
->
(
issue
)
{
issue
.
due_date
&
.
to_s
(
:csv
)
},
'Created At (UTC)'
=>
->
(
issue
)
{
issue
.
created_at
&
.
to_s
(
:csv
)
},
'Updated At (UTC)'
=>
->
(
issue
)
{
issue
.
updated_at
&
.
to_s
(
:csv
)
},
'Closed At (UTC)'
=>
->
(
issue
)
{
issue
.
closed_at
&
.
to_s
(
:csv
)
},
'Milestone'
=>
->
(
issue
)
{
issue
.
milestone
&
.
title
},
'Labels'
=>
->
(
issue
)
{
@labels
[
issue
.
id
].
sort
.
join
(
','
).
presence
}
}
...
...
changelogs/unreleased-ee/sh-support-closed-at-csv.yml
0 → 100644
View file @
c75bf8af
---
title
:
Add closed_at field to issue CSV export
merge_request
:
author
:
spec/services/issues/export_csv_service_spec.rb
View file @
c75bf8af
...
...
@@ -39,6 +39,7 @@ describe Issues::ExportCsvService, services: true do
due_date:
DateTime
.
new
(
2014
,
3
,
2
),
created_at:
DateTime
.
new
(
2015
,
4
,
3
,
2
,
1
,
0
),
updated_at:
DateTime
.
new
(
2016
,
5
,
4
,
3
,
2
,
1
),
closed_at:
DateTime
.
new
(
2017
,
6
,
5
,
4
,
3
,
2
),
labels:
[
feature_label
,
idea_label
])
end
...
...
@@ -101,6 +102,10 @@ describe Issues::ExportCsvService, services: true do
specify
'updated_at'
do
expect
(
csv
[
0
][
'Updated At (UTC)'
]).
to
eq
'2016-05-04 03:02:01'
end
specify
'closed_at'
do
expect
(
csv
[
0
][
'Closed At (UTC)'
]).
to
eq
'2017-06-05 04:03:02'
end
end
context
'with minimal details'
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