Defect #19092
closedCSV Export and general csv separator
0%
Description
Hi everyone, this report is for redmine 2.4.3.stable (I've not found in any mention of this problem in changelog for 2.4.x, 2.5.x or 2.6.x)
For CSV Export I've found a bug when users uses redmine general_csv_separator in subject or description.
Steps to reproduce problem (I assume that general_csv_separator used is ;)
1) open a new issue
2) as subject use test;1 and description test;1
3) save issue
4) export as csv
5) open csv with excel, you don't see inserted test or description
To solve this problem, I suggest together try to follow best practices with CSV (starting for example from Wikipedia ).
Following Wikipedia links I've found this (see 6):
6. Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes. For example: "aaa","b CRLF bb","ccc" CRLF zzz,yyy,xxx
so i propose to change redmine csv export when a field there is csv separator, adding double-quotes, what do you think?
Note: I know that I can change my csv separator settings in locale, for example using another separator as | or $, but this is not solving this issue, because users can enter anything in any field.
Note2: could please admins add a new category for issues related to CSV export?
Thank you
Files
Updated by Toshi MARUYAMA almost 10 years ago
- File excel2013-ja.png excel2013-ja.png added
- Status changed from New to Needs feedback
I cannot reproduce.
$ hg parent --template='{branch}:{svnrev}\n' 2.6-stable:13884 $ ruby --version ruby 1.8.7 (2014-01-28 patchlevel 376) [x86_64-linux]
Japanese separator is "," as same English.
CSV file:
#,Tracker,Status,Priority,Subject,Assignee,Updated,Description 7,Bug,New,Normal,Korean Translation,"",02/12/2015 09:23 PM,"new line new line new line"
Excel 2013:
Updated by Toshi MARUYAMA almost 10 years ago
$ hg parent --template='{branch}:{svnrev}\n' 2.6-stable:13984 $ ruby --version ruby 1.8.7 (2014-01-28 patchlevel 376) [x86_64-linux] $ ruby script/rails console Loading development environment (Rails 3.2.21) 1.8.7-head :001 > csv_string = FCSV.generate(:col_sep => ';') do |csv| 1.8.7-head :002 > csv << ["ddd\neeee", "fffff"] 1.8.7-head :003?> end => "\"ddd\neeee\";fffff\n"
Updated by Toshi MARUYAMA almost 10 years ago
$ ruby --version ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux] $ irb 1.9.3-p551 :001 > require 'csv' => true 1.9.3-p551 :002 > csv_string = CSV.generate(:col_sep => ';') do |csv| 1.9.3-p551 :003 > csv << ["ddd\neeee", "fffff"] 1.9.3-p551 :004?> end => "\"ddd\neeee\";fffff\n"
Updated by Jan Niggemann (redmine.org team member) about 9 years ago
- Status changed from Needs feedback to Closed
- Resolution set to Invalid
Updated by Jan Niggemann (redmine.org team member) about 9 years ago
- Resolution changed from Invalid to No feedback