Feature #39997
closedAdd an option to render values of Integer- and Float-format custom fields with thousands delimiters
0%
Description
This is extracted from #22024:
Mischa The Evil wrote in #22024#note-10:
Go MAEDA wrote in #22024#note-6:
The patch by Liane Hampe also adds the ability to display thousand delimiters. However, I think displaying thousand delimiters should be out of the scope of this patch. This is because not all users may agree with always displaying the thousand delimiter. Additionally, at this time, entering a value with a thousand delimiter into a custom field results in a validation error. In my opinion, the feature to display thousand delimiters should be discussed in another issue.
A separate, additional feature providing a custom field option (using
field_attributes
?) to display thousand delimiters for selectedFloat
(but alsoInteger
) custom fields could be nice to have in some cases when dealing with larger values, [...]
However, I think that Redmine doesn't need to provide support for entering values with thousands delimiters into a custom field. It feels like overkill to me.
Files
Related issues
Updated by Holger Just 12 months ago
- Related to Feature #22024: Support localized decimal separators for float values added
Updated by Go MAEDA 5 months ago
- File 39997-WIP-20240713.patch 39997-WIP-20240713.patch added
I started to write a patch for this feature.
Updated by Go MAEDA 5 months ago
- File 0001-Refactor-ApplicationHelper-format_object-to-support-.patch 0001-Refactor-ApplicationHelper-format_object-to-support-.patch added
- File 0002-Updated-number.format.delimiter-values-in-locale-fil.patch 0002-Updated-number.format.delimiter-values-in-locale-fil.patch added
- File 0003-Add-option-to-render-Integer-and-Float-custom-fields.patch added
- File clipboard-202407141741-fbjcc.png clipboard-202407141741-fbjcc.png added
- File clipboard-202407141743-fduoh.png clipboard-202407141743-fduoh.png added
- Target version set to Candidate for next major release
Heres are patches to implement this feature:
- attachment:0001-Refactor-ApplicationHelper-format_object-to-support-.patch refactors ApplicationHelper#format_object to accept
:html
option as a keyword argument. This change is a prerequisite for adding the new:thousands_delimiter
option in the third patch. - 0002-Updated-number.format.delimiter-values-in-locale-fil.patch updates `number.format.delimiter` values in
config/locales/*.yml
files according to rails-i18n'srails/locales/*.yml
files to correctly display thousands separators. But I didn't change locales wherenumber.format.separator
values differ between Redmine and rails-i18n - 0003-Add-option-to-render-Integer-and-Float-custom-fields.patch implements the option to render Integer and Float custom fields with thousands delimiters.