Project

General

Profile

Actions

Feature #39997

open

Add an option to render values of Integer- and Float-format custom fields with thousands delimiters

Added by Mischa The Evil 7 months ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

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 selected Float (but also Integer) 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

Related to Redmine - Feature #22024: Support localized decimal separators for float valuesClosedGo MAEDA

Actions
Actions #1

Updated by Holger Just 7 months ago

  • Related to Feature #22024: Support localized decimal separators for float values added
Actions #2

Updated by Go MAEDA 5 days ago

I started to write a patch for this feature.

Actions #3

Updated by Go MAEDA 4 days ago

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's rails/locales/*.yml files to correctly display thousands separators. But I didn't change locales where number.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.

Actions #5

Updated by Go MAEDA 4 days ago

  • File deleted (0003-Add-option-to-render-Integer-and-Float-custom-fields.patch)
Actions #6

Updated by Go MAEDA 1 day ago

  • Target version changed from Candidate for next major release to 6.0.0

Setting the target version to 6.0.0.

Actions

Also available in: Atom PDF