Defect #41895 ยป 41895.patch
| app/helpers/queries_helper.rb | ||
|---|---|---|
| 309 | 309 |
else |
| 310 | 310 |
format_object(value, html: false) do |value| |
| 311 | 311 |
case value.class.name |
| 312 |
when 'Float' |
|
| 312 |
when 'Float', 'Rational'
|
|
| 313 | 313 |
sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator))
|
| 314 | 314 |
when 'IssueRelation' |
| 315 | 315 |
value.to_s(object) |
| test/functional/timelog_controller_test.rb | ||
|---|---|---|
| 1740 | 1740 |
get :index, :params => {:format => 'csv'}
|
| 1741 | 1741 |
assert_response :success |
| 1742 | 1742 |
assert_equal 'text/csv; header=present', response.media_type |
| 1743 | ||
| 1744 |
parsed_csv = CSV.parse(response.body) |
|
| 1745 |
assert_equal %w[Project Date User Activity Issue Comment Hours], parsed_csv.first |
|
| 1746 |
assert_equal( |
|
| 1747 |
[ |
|
| 1748 |
'eCookbook', '03/12/2007', 'Redmine Admin', 'Design', |
|
| 1749 |
'Bug #1: Cannot print recipes', '', '150.00' |
|
| 1750 |
], |
|
| 1751 |
parsed_csv.last |
|
| 1752 |
) |
|
| 1743 | 1753 |
end |
| 1744 | 1754 |
end |
| 1745 | 1755 | |