Project

General

Profile

Actions

Defect #42339

closed

Value for "hours" incorrect when creating a time entry using the API

Added by Stefan Borchert about 1 month ago. Updated about 1 month ago.

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

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

Description

We use Redmine version 6.0.3.stable and a custom script to synchronize time entries from toggl to Redmine.
This worked well so far but after the update to 6.0.3.stable we noticed that some time entries have incorrect values for hours.
Example: we are creating a new time entry and send "hours: 0.44". The resulting time entry has the value "0.43" for property "hours".

Is there any sanitizing or rounding of values in Redmine weare unaware of? It worked in Redmine 5 so there has to be some changes.

Environment

Redmine version                6.0.3.stable
Ruby version 3.2.3-p157 (2024-01-18) [x86_64-linux-gnu]
Rails version 7.2.2.1
Environment production
Database adapter PostgreSQL
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery sendmail

Files

42339-01.mp4 (391 KB) 42339-01.mp4 Stefan Borchert, 2025-02-28 21:21

Related issues

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

Actions
Actions

Also available in: Atom PDF