Project

General

Profile

Defect #32768 » 0001-Fix-Internal-Error-when-issue-text-custom-field-is-s.patch

Marius BĂLTEANU, 2020-01-10 18:20

View differences:

app/views/timelog/_list.html.erb
50 50
        <%= link_to_context_menu %>
51 51
    </td>
52 52
  </tr>
53

  
53 54
  <% @query.block_columns.each do |column|
54
       if (text = column_content(column, issue)) && text.present? -%>
55
       if (text = column_content(column, entry)) && text.present? -%>
55 56
  <tr class="<%= current_cycle %>">
56 57
    <td colspan="<%= @query.inline_columns.size + 1 %>" class="<%= column.css_classes %>">
57
    <% if query.block_columns.count > 1 %>
58
    <% if @query.block_columns.count > 1 %>
58 59
      <span><%= column.caption %></span>
59 60
    <% end %>
60 61
    <%= text %>
test/functional/timelog_controller_test.rb
1430 1430
      assert_select '+ span.count', :text => '2'
1431 1431
    end
1432 1432
  end
1433

  
1434
  def test_index_with_inline_issue_long_text_custom_field_column
1435
    field = IssueCustomField.create!(:name => 'Long text', :field_format => 'text', :full_width_layout => '1',
1436
      :tracker_ids => [1], :is_for_all => true)
1437
    issue = Issue.find(1)
1438
    issue.custom_field_values = {field.id => 'This is a long text'}
1439
    issue.save!
1440

  
1441
    get :index, :params => {
1442
        :set_filter => 1,
1443
        :c => ['subject', 'description', "issue.cf_#{field.id}"]
1444
      }
1445
    assert_response :success
1446
    assert_select "td.issue_cf_#{field.id}", :text => 'This is a long text'
1447
  end
1433 1448
end
    (1-1/1)