0001-33052-fix-issue-text-format-v2.patch

Patch for the issue - Kevin Fischer, 2020-03-02 04:40

Download (2.26 KB)

View differences:

test/functional/timelog_report_test.rb
259 259
    assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last
260 260
  end
261 261

  
262
  def test_report_csv_issue_format
263
    get :report, :params => {
264
      :project_id => 1,
265
      :columns => 'month',
266
      :from => "2007-01-01",
267
      :to => "2007-06-30",
268
      :criteria => ["issue"],
269
      :format => "csv"
270
    }
271
    assert_response :success
272
    assert_equal 'text/csv', @response.media_type
273
    assert_equal @response.body, <<~CSV
274
      Issue,2007-3,2007-4,Total time
275
      Bug #1: Cannot print recipes,154.25,\"\",154.25
276
      Bug #3: Error 281 when updating a recipe,"",1.00,1.00
277
      [none],\"\",7.65,7.65
278
      Total time,154.25,8.65,162.90
279
    CSV
280
  end
281

  
262 282
  def test_csv_big_5
263 283
    str_big5  = (+"\xa4@\xa4\xeb").force_encoding('Big5')
264 284
    user = User.find_by_id(3)
265
- 
app/helpers/application_helper.rb
251 251
    when 'FalseClass'
252 252
      l(:general_text_No)
253 253
    when 'Issue'
254
      object.visible? && html ? link_to_issue(object) : "##{object.id}"
254
      return "##{object.id}" unless object.visible?
255

  
256
      return link_to_issue(object) if html
257

  
258
      "#{object.tracker} ##{object.id}: #{object.subject}"
255 259
    when 'Attachment'
256 260
      if html
257 261
        content_tag(
258
-