Defect #33052 » 0001-33052-fix-issue-text-format-v2.patch
| test/functional/timelog_report_test.rb | ||
|---|---|---|
|
assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last
|
||
|
end
|
||
|
def test_report_csv_issue_format
|
||
|
get :report, :params => {
|
||
|
:project_id => 1,
|
||
|
:columns => 'month',
|
||
|
:from => "2007-01-01",
|
||
|
:to => "2007-06-30",
|
||
|
:criteria => ["issue"],
|
||
|
:format => "csv"
|
||
|
}
|
||
|
assert_response :success
|
||
|
assert_equal 'text/csv', @response.media_type
|
||
|
assert_equal @response.body, <<~CSV
|
||
|
Issue,2007-3,2007-4,Total time
|
||
|
Bug #1: Cannot print recipes,154.25,\"\",154.25
|
||
|
Bug #3: Error 281 when updating a recipe,"",1.00,1.00
|
||
|
[none],\"\",7.65,7.65
|
||
|
Total time,154.25,8.65,162.90
|
||
|
CSV
|
||
|
end
|
||
|
def test_csv_big_5
|
||
|
str_big5 = (+"\xa4@\xa4\xeb").force_encoding('Big5')
|
||
|
user = User.find_by_id(3)
|
||
|
-
|
||
| app/helpers/application_helper.rb | ||
|---|---|---|
|
when 'FalseClass'
|
||
|
l(:general_text_No)
|
||
|
when 'Issue'
|
||
|
object.visible? && html ? link_to_issue(object) : "##{object.id}"
|
||
|
return "##{object.id}" unless object.visible?
|
||
|
return link_to_issue(object) if html
|
||
|
"#{object.tracker} ##{object.id}: #{object.subject}"
|
||
|
when 'Attachment'
|
||
|
if html
|
||
|
content_tag(
|
||