https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292021-08-09T19:45:11ZRedmineRedmine - Defect #35726: Time Formatting does not apply to CSV exportshttps://www.redmine.org/issues/35726?journal_id=1036352021-08-09T19:45:11ZMischa The Evil
<ul><li><strong>File</strong> <a href="/attachments/27860">#35726.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/27860/%2335726.patch">#35726.patch</a> added</li><li><strong>Subject</strong> changed from <i>Time Formatting does not apply in time reports export</i> to <i>Time Formatting does not apply to CSV exports</i></li><li><strong>Category</strong> deleted (<del><i>Time tracking</i></del>)</li><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li><li><strong>Affected version</strong> changed from <i>4.2.2</i> to <i>3.4.0</i></li></ul>Nice catch! However, this does not only apply to the CSV export of the timelog report. It also applies to CSV exports of:
<ul>
<li>timelog details;</li>
<li>issue lists.</li>
</ul>
I'll leave a patch containing:
<ul>
<li>the OP's initial changes, in a correct format;</li>
<li>an additional change of <code>QueriesHelper#csv_value</code> to fix the issue for CSV exports of timelog details and issue lists.</li>
</ul>
<p>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).<br />I'll set the affected version to '3.4.0' because the issue was introduced with <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Introduce a setting to change the display format of timespans to HH:MM (Closed)" href="https://www.redmine.org/issues/23996">#23996</a>. The fixes have to be back-ported to all supported Redmine branches.</p>
<p>I think that before this is being committed additional test coverage should be added for the fixed cases.</p> Redmine - Defect #35726: Time Formatting does not apply to CSV exportshttps://www.redmine.org/issues/35726?journal_id=1036362021-08-09T19:46:18ZMischa The Evil
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/23996">Feature #23996</a>: Introduce a setting to change the display format of timespans to HH:MM</i> added</li></ul> Redmine - Defect #35726: Time Formatting does not apply to CSV exportshttps://www.redmine.org/issues/35726?journal_id=1036442021-08-10T10:17:50ZHolger Just
<ul></ul><p>I don't think we should backport this to older versions.</p>
<p>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.</p>
<p>As such, I believe we may ship this in <a class="version" href="https://www.redmine.org/versions/155">5.0.0</a> as a potentially breaking change and not backport it.</p> Redmine - Defect #35726: Time Formatting does not apply to CSV exportshttps://www.redmine.org/issues/35726?journal_id=1036582021-08-11T06:23:38ZMischa The Evil
<ul></ul><p>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.</p>
<p>Nonetheless, I don't think that back-porting the fixes would become troublesome for the users in this case because:</p>
<p>Holger Just wrote:</p>
<blockquote>
<p>[...] 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.</p>
</blockquote>
<p>... 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.<br />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 <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Introduce a setting to change the display format of timespans to HH:MM (Closed)" href="https://www.redmine.org/issues/23996">#23996</a> states: <cite>"a setting to also display such values in this way <strong>throughout</strong> the app"</cite>). And by then we can "argue" over whether <cite>"throughout the app"</cite> actually applies to CSV exports <em>created by</em> 'the app'... :lol: I'd say it does... :grin:</p> Redmine - Defect #35726: Time Formatting does not apply to CSV exportshttps://www.redmine.org/issues/35726?journal_id=1052912022-01-19T21:44:42ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-9 priority-4 priority-default" href="/issues/31637">Defect #31637</a>: CSV and PDF export don't respect Time span format</i> added</li></ul> Redmine - Defect #35726: Time Formatting does not apply to CSV exportshttps://www.redmine.org/issues/35726?journal_id=1052932022-01-19T21:45:05ZGo MAEDA
<ul><li><strong>Category</strong> set to <i>Time tracking</i></li></ul> Redmine - Defect #35726: Time Formatting does not apply to CSV exportshttps://www.redmine.org/issues/35726?journal_id=1116882023-11-29T09:21:22ZMischa The Evil
<ul><li><strong>Target version</strong> set to <i>6.0.0</i></li></ul><p>This might be the time to schedule this (and by extension <a class="issue tracker-1 status-9 priority-4 priority-default" title="Defect: CSV and PDF export don't respect Time span format (Confirmed)" href="https://www.redmine.org/issues/31637">#31637</a>).</p>