プロジェクト

全般

プロフィール

Vote #81585

未完了

Time Formatting does not apply to CSV exports

Admin Redmine さんが約4年前に追加. ほぼ4年前に更新.

ステータス:
Confirmed
優先度:
通常
担当者:
-
カテゴリ:
Time tracking_13
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
13
version_id:
0
issue_org_id:
35726
author_id:
147409
assigned_to_id:
0
comments:
6
status_id:
9
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
119
ステータス-->[Confirmed]

説明

When you export time report to CSV, formatting does not apply on hours field.
Attached patch can fixed it.


journals

Nice catch! However, this does not only apply to the CSV export of the timelog report. It also applies to CSV exports of:
* timelog details;
* issue lists.

I'll leave a patch containing:
* the OP's initial changes, in a correct format;
* an additional change of @QueriesHelper#csv_value@ to fix the issue for CSV exports of timelog details and issue lists.

I'll set the category to 'none' because it applies not only to 'Time tracking' and we don't have a CSV export category yet (and I don't want [to consider] to create it now).
I'll set the affected version to '3.4.0' because the issue was introduced with #23996. The fixes have to be back-ported to all supported Redmine branches.

I think that before this is being committed additional test coverage should be added for the fixed cases.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I don't think we should backport this to older versions.

The CSV export emits a technical format which is usually consumed by spreadsheet software, or custom reporting tools. ere, it is important not to change the output format without consideration. As the output of the hours have always been floats here, consuming software likely expects this. Changing this in a patch update will likely break the assumptions of these tools unexpectedly.

As such, I believe we may ship this in version:5.0.0 as a potentially breaking change and not backport it.
--------------------------------------------------------------------------------
Good point. Fair enough. FYI, I'm also ok with no back-ports like you propose. My comment was more about the Redmine releases that are affected by this defect, and as such can be qualified as eligible for receiving the back-ports.

Nonetheless, I don't think that back-porting the fixes would become troublesome for the users in this case because:

Holger Just wrote:
> [...] As the output of the hours have always been floats here, consuming software likely expects this. Changing this in a patch update will likely break the assumptions of these tools unexpectedly.

... this is not what these fixes would actually do IMHO. They don't change the output format of hours. Instead, slightly more subtle, they change the applicability of the setting that should determine the desired output format of the hours values.
Now, given that the default value of the setting is (still) to output floats (i.e. 'decimal'), nothing would change unless the administrator itself explicitly configured the Redmine instance to do so (i.e. by changing the setting to 'minutes'). And in that case it is/would be an anomaly to detect that only the CSV exports don't obey this setting (given that #23996 states: ??"a setting to also display such values in this way *throughout* the app"??). And by then we can "argue" over whether ??"throughout the app"?? actually applies to CSV exports _created by_ 'the app'... :lol: I'd say it does... :grin:
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,23996,Introduce a setting to change the display format of timespans to HH:MM
relates,Confirmed,31637,CSV and PDF export don't respect Time span format

Admin Redmine さんがほぼ4年前に更新

  • カテゴリTime tracking_13 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0