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
91ac5c7b
Commit
91ac5c7b
authored
Oct 14, 2016
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issues CSV time formats use to_s
parent
fa903956
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app/views/projects/issues/index.csv.ruby
app/views/projects/issues/index.csv.ruby
+3
-3
config/initializers/date_time_formats.rb
config/initializers/date_time_formats.rb
+2
-0
No files found.
app/views/projects/issues/index.csv.ruby
View file @
91ac5c7b
...
...
@@ -13,9 +13,9 @@ columns = {
'Author'
=>
'author_name'
,
'Assignee'
=>
'assignee_name'
,
'Confidential'
=>
'confidential'
,
'Due Date'
=>
->
(
issue
)
{
issue
.
due_date
&
.
strftime
(
'%Y-%m-%d'
)
},
'Created At (UTC)'
=>
->
(
issue
)
{
issue
.
created_at
&
.
strftime
(
'%Y-%m-%d %H:%M:%S'
)
},
'Updated At (UTC)'
=>
->
(
issue
)
{
issue
.
updated_at
&
.
strftime
(
'%Y-%m-%d %H:%M:%S'
)
},
'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
)
},
'Milestone'
=>
->
(
issue
)
{
issue
.
milestone
&
.
title
},
'Labels'
=>
->
(
issue
)
{
labels
[
issue
.
id
].
sort
.
join
(
','
).
presence
}
}
...
...
config/initializers/date_time_formats.rb
View file @
91ac5c7b
...
...
@@ -2,8 +2,10 @@
# :medium - Nov 10, 2007
# :long - November 10, 2007
Date
::
DATE_FORMATS
[
:medium
]
=
'%b %-d, %Y'
Date
::
DATE_FORMATS
[
:csv
]
=
'%Y-%m-%d'
# :short - 18 Jan 06:10
# :medium - Jan 18, 2007 6:10am
# :long - January 18, 2007 06:10
Time
::
DATE_FORMATS
[
:medium
]
=
'%b %-d, %Y %-I:%M%P'
Time
::
DATE_FORMATS
[
:csv
]
=
'%Y-%m-%d %H:%M:%S'
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