Opened 10 years ago
Closed 9 years ago
#11762 closed enhancement (fixed)
[PATCH] Use column label when exporting to CSV
Reported by: | tweksteen | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | low | Milestone: | 1.2 |
Component: | query system | Version: | 1.1dev |
Severity: | minor | Keywords: | patch csv |
Cc: | Branch: | ||
Release Notes: |
Column labels are used when exporting query results to CSV. The labels are not translated. |
||
API Changes: | |||
Internal Changes: |
Description
This patch uses the column label instead of name when exporting to CSV.
Attachments (1)
Change History (14)
by , 10 years ago
Attachment: | add_label_to_csv_export.diff added |
---|
comment:1 by , 10 years ago
Component: | general → query system |
---|---|
Keywords: | csv added |
comment:2 by , 10 years ago
Milestone: | → next-dev-1.1.x |
---|---|
Priority: | normal → low |
Severity: | normal → minor |
So yes, maybe for the query view.
Care to update the patch and adapt the tests? I doubt they'll pass with this change… and if so, it means we don't have yet tests for that and you probably should add one!
comment:3 by , 10 years ago
Milestone: | next-dev-1.1.x → next-major-releases |
---|
Retargetting tickets to narrow focus for milestone:1.2. Please move the ticket back to milestone:next-dev-1.1.x if you intend to resolve it by milestone:1.2.
comment:4 by , 9 years ago
Keywords: | patch added |
---|
comment:6 by , 9 years ago
Milestone: | next-major-releases → 1.0.12 |
---|---|
Owner: | set to |
Status: | new → assigned |
Proposed changes in log:rjollos.git:t11762_query_csv_col_labels.
comment:7 by , 9 years ago
Csv export can be used to import via th:TicketImportPlugin. I don't think we should always use field's labels for the export. If such a import plugin understands field's labels when importing, it couldn't detect fields when fields have same label.
I think we should add option for the feature and/or the milestone should be 1.2.
comment:8 by , 9 years ago
Milestone: | 1.0.12 → 1.2 |
---|
If the issue is simply a matter of compatibility with existing plugins, I'd rather move to milestone:1.2 instead of adding an option.
comment:10 by , 9 years ago
I guess that, on the one hand it would be good to localize the labels so that the exported content matches what is shown on the Query page. On the other hand, I can see how that would be bad for export/import of the data. We could disable translations like is done in the ticket notifications: tags/trac-1.0.11/trac/ticket/notification.py@:263#L249.
It might be worth considering a way to translate the labels by default while having a query parameter that allows disabling translations for use with the TicketImportPlugin.
comment:12 by , 9 years ago
Release Notes: | modified (diff) |
---|
comment:13 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed to trunk in [14788].
I think that csv from report view should keep original labels because SQL statements in report system have labels. See tags/trac-1.1.1/trac/ticket/report.py@:766#L765