Project

General

Profile

Actions

Defect #41895

closed

Spent time CSV report returning `hours` as Rational instead of Float

Added by Thomas Stollorcz 28 days ago. Updated 19 days ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Same issues as in Defect #41819 only for CSV report, the patch does not help.
Before Redmine 6, the hours field returned data in double (float) format, like 0,25. Currently, Redmine 6 returns this field in weird fraction format 9/1 (as 9 hours).

CSV report from Redmine 5.1.1

Date;Author;Hours;Issue;Comment
24.11.2024;User Name;1,5;Servicerequest #1364: Issue #1;"" 
23.11.2024;User Name;0,75;Servicerequest #1415: Issue #2;"" 
23.11.2024;User Name;0,5;Servicerequest #1416: Issue #3;"" 
22.11.2024;User Name;4,25;Servicerequest #1415: Issue #2;"" 

CSV report from Redmine 6.0.1

Date;Author;Hours;Issue;Comment
24.11.2024;User Name;3/2;Servicerequest #1364: Issue #1;"" 
23.11.2024;User Name;3/4;Servicerequest #1415: Issue #2;"" 
23.11.2024;User Name;1/2;Servicerequest #1416: Issue #3;"" 
22.11.2024;User Name;17/4;Servicerequest #1415: Issue #2;"" 


Files

41895.patch (1.29 KB) 41895.patch Go MAEDA, 2024-12-01 07:21

Related issues

Related to Redmine - Defect #40914: Fix precision issues in TimeEntry#hours calculation by returning Rational instead of FloatClosedGo MAEDA

Actions
Actions #1

Updated by Marius BĂLTEANU 28 days ago

  • Assignee set to Marius BĂLTEANU
  • Target version set to 6.0.2
Actions #2

Updated by Go MAEDA 26 days ago

The attached patch fixes this issue.

Actions #3

Updated by Go MAEDA 26 days ago

  • Related to Defect #40914: Fix precision issues in TimeEntry#hours calculation by returning Rational instead of Float added
Actions #4

Updated by Katsuya HIDAKA 24 days ago

I've tested the patch (41895.patch) on the latest Redmine master and confirmed the following:

  • The patch resolves the reported issue
  • No similar issues occur in related features, including:
    • Atom and CSV exports of Spent time Details
    • CSV export of Spent time Report
    • Issues list (screen display, CSV, PDF, and Atom exports)
    • Time tracking summary for versions

I think this patch works well.

Actions #5

Updated by Go MAEDA 23 days ago

  • Status changed from New to Resolved
  • Assignee changed from Marius BĂLTEANU to Go MAEDA
  • Resolution set to Fixed

Committed the fix in r23351.

Actions #6

Updated by Go MAEDA 19 days ago

  • Status changed from Resolved to Closed

Merged the fix into the 6.0-stable branch in r23357.

Actions

Also available in: Atom PDF