Project

General

Profile

Actions

Feature #37621

closed

Add field separator option to CSV export dialog

Added by Karel Pičman over 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

I would like to add a field separator option to the CVS export option form.

Background:

If I have set the language e.g. to English in my Redmine profile, the separator is taken from config/locales/en.yml (general_csv_separator) and it is comma. If I have installed e.g. German Microsoft Office and try to open such a CSV, it expects that the separator is semicolon. Unfortunately, Microsoft Office doesn't offer to choose the separator prior opening a CSV file and always uses the default value.

It is also related to #37581, where many translations have set general_csv_separator to different value than is expected in Microsoft Office.


Files

Actions #1

Updated by Go MAEDA over 1 year ago

Is the ability to select decimal separator unnecessary?

I think you need to change the decimal separator to ";" when you change the field separator to ",".

Actions #2

Updated by Karel Pičman over 1 year ago

No, you needn't. When the decimal separator is comma, values containing comma are enclosed in apostrophes.

...2022-09-12,"","2,50","2,50",0,2022-09-12 07:37...

Actions #3

Updated by Go MAEDA over 1 year ago

  • Target version set to Candidate for next major release
Actions #4

Updated by Go MAEDA over 1 year ago

  • Target version changed from Candidate for next major release to 5.1.0

Setting the target version to 5.1.0.

Actions #5

Updated by Go MAEDA 4 months ago

Committed the patch in r22359 with the following changes.

  • Removed ":", "{tab}", "{space}" from the field separator options because the current importer does not support them. But I think "{tab}" is useful, so I opened a new issue #39212
  • Changed the text in the select box from "," and ";" to "Comma" and "Semicolon", the same as the importer's dialog
  • Added more tests

Thank you for your contribution.

Actions #6

Updated by Mischa The Evil 4 months ago

Go MAEDA wrote in #note-5:

  • Removed ":", "{tab}", "{space}" from the field separator options because the current importer does not support them. [...]

While I don't care about this change particularly, I do strongly think that Redmine's CSV-import capabilities shouldn't be leading in setting the scope for the CSV-export capabilities. I believe that Redmine should be agnostic about any post-processors of the exported CSV file.

Actions #7

Updated by Go MAEDA 4 months ago

  • Tracker changed from Patch to Feature
  • Resolution set to Fixed
Actions

Also available in: Atom PDF