Project

General

Profile

Actions

Feature #39997

closed

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

Added by Mischa The Evil 12 months ago. Updated 5 months ago.

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

0%

Estimated time:
Resolution:
Fixed

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 12 months ago

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

Updated by Go MAEDA 5 months ago

I started to write a patch for this feature.

Actions #3

Updated by Go MAEDA 5 months 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 5 months ago

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

Updated by Go MAEDA 5 months ago

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

Setting the target version to 6.0.0.

Actions #7

Updated by Go MAEDA 5 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patches in r22933, r22934, and r22935.

  • Now integer and float custom fields have a "Thousands delimiter" option
  • Values are rendered with thousands delimiters when the option is enabled
Actions

Also available in: Atom PDF