Vote #71450
完了Custom field float separator in CSV export
0%
説明
We are using custom fields in the time entries of type float.
Using german language we noticed that the decimal separator in csv exports are not changed! (Also not for the time itself but i could solve that with #8368.
For the custom fields i could fix it in this way:
In /lib/redmine/custom_field_format.rb find this (Around line 47)
['string','text','int','float','list'].each do |name|
define_method("format_as_#{name}") {|value|
return value
}
end
and replace it with:
def format_as_float(value)
decimal_separator = l(:general_csv_decimal_separator)
return ("%.2f" % value).gsub('.',decimal_separator)
end
def format_as_int(value)
decimal_separator = l(:general_csv_decimal_separator)
return ("%.2f" % value).gsub('.',decimal_separator)
end
['string','text','list'].each do |name|
define_method("format_as_#{name}") {|value|
return value
}
end
It's working but i don't know if this was the right place.
journals
--------------------------------------------------------------------------------
Just realize that it doesnt make sense for integer...
--------------------------------------------------------------------------------
Fixed in r11441.
--------------------------------------------------------------------------------