Project

General

Profile

Defect #44244 » fix-time-entry-comments-linking.patch

Takenori TAKAKI, 2026-07-09 06:45

View differences:

app/views/issues/tabs/_time_entries.html.erb
26 26
        </li>
27 27
      </ul>
28 28
      <div class="journal-note">
29
        <%= time_entry.comments %>
29
        <%= textilizable(time_entry, :comments) %>
30 30
      </div>
31 31
    </div>
32 32
  </div>
test/functional/issues_controller_test.rb
3364 3364
    end
3365 3365
  end
3366 3366

  
3367
  def test_show_time_entries_tab_should_link_commit_references
3368
    @request.session[:user_id] = 2
3369
    # changeset_001 has scmid 691322a8eb01e11fd7 in repository 10 (project 1)
3370
    scmid = '691322a8eb01e11fd7'
3371
    comment = l(:text_time_logged_by_changeset, :value => "commit:#{scmid}", :locale => 'en')
3372
    issue = Issue.generate!(:project_id => 1, :tracker_id => 1)
3373
    TimeEntry.generate!(:issue => issue, :comments => comment)
3374

  
3375
    get :issue_tab, :params => {:id => issue.id, :name => 'time_entries'}, :xhr => true
3376
    assert_response :success
3377

  
3378
    assert_select 'div.journal-note a.changeset', :text => scmid
3379
  end
3380

  
3367 3381
  def test_show_should_display_open_badge_for_open_issue
3368 3382
    get :show, params: {id: 1}
3369 3383

  
(3-3/3)