Actions
Defect #41819
closedTime entry API returning `hours` as Rational instead of Float
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
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).
This change wasn't stated in changelog. Is this an intentional change? It breaks integration that uses REST API from Redmine.
Response from Redmine 5.0.11:
{ "id": 57818, "project": { "id": 120, "name": "Project Name" }, "issue": { "id": 50271 }, "user": { "id": 534, "name": "User Name" }, "activity": { "id": 27, "name": "Implementation" }, "hours": 0.25, "comments": "Comment", "spent_on": "2024-10-23", "created_on": "2024-10-23T08:03:14Z", "updated_on": "2024-10-23T08:03:14Z" },
Response from Redmine 6.0.1
{ "id": 153263, "project": { "id": 524, "name": "Project Name" }, "issue": { "id": 56753 }, "user": { "id": 636, "name": "User Name" }, "activity": { "id": 10, "name": "Implementation" }, "hours": "8/1", "comments": "", "spent_on": "2022-04-13", "created_on": "2022-04-27T10:55:22Z", "updated_on": "2022-04-27T10:55:22Z" },
Files
Related issues
Actions