Defect #42330
openCustom Floating Point Field Truncating Decimal Part
0%
Description
Description¶
I have detected a bug related with custom floating point number fields, specifically in how their decimal part is displayed in read-only views.
Steps to Reproduce¶
- Create a custom floating-point field (in my case: "Betrag") to store currency values.
- Add this new field to any tracker for use.
- Enter a value with decimals (e.g., 100,50) and save the ticket.
- View the ticket details or any table displaying multiple tickets where this field appears as read-only.
- The decimal part is truncated, and the value appears incorrectly as 100,00.
- Re-enter the Edit mode - inside the input field, the correct value (e.g., 100,50) reappears.
Example screenshots with the value "4788,89":
When creating or editing:
When displayed in read-only:
Expected Behavior¶
The decimal part should be consistently displayed both in read-only mode and in edit mode without truncation.
Actual Behavior¶
The decimal part is missing in read-only mode, but reappears when editing.
Impact¶
This issue can lead to misinterpretation of numerical values, especially for currency fields where precision is critical.
Suggested Fix¶
Ensure that floating point numbers are consistently formatted and displayed across both read-only and edit views.
Other relevant information¶
Using Redmine Docker image version 6:
Environment:
Redmine version 6.0.3.stable
Ruby version 3.3.7-p123 (2025-01-15) [aarch64-linux]
Rails version 7.2.2.1
Environment production
Database adapter SQLite
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
Redmine settings:
Redmine theme Default
SCM:
Subversion 1.14.2
Mercurial 6.3.2
Bazaar 3.3.2
Git 2.39.5
Filesystem
Redmine plugins:
no plugin installed
Files
No data to display