mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 14:26:04 +01:00
Fix Internal Error when issue text custom field is shown in Spent time query results (#32768).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19419 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -50,11 +50,12 @@
|
||||
<%= link_to_context_menu %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% @query.block_columns.each do |column|
|
||||
if (text = column_content(column, issue)) && text.present? -%>
|
||||
if (text = column_content(column, entry)) && text.present? -%>
|
||||
<tr class="<%= current_cycle %>">
|
||||
<td colspan="<%= @query.inline_columns.size + 1 %>" class="<%= column.css_classes %>">
|
||||
<% if query.block_columns.count > 1 %>
|
||||
<% if @query.block_columns.count > 1 %>
|
||||
<span><%= column.caption %></span>
|
||||
<% end %>
|
||||
<%= text %>
|
||||
|
||||
@@ -1430,4 +1430,19 @@ class TimelogControllerTest < Redmine::ControllerTest
|
||||
assert_select '+ span.count', :text => '2'
|
||||
end
|
||||
end
|
||||
|
||||
def test_index_with_inline_issue_long_text_custom_field_column
|
||||
field = IssueCustomField.create!(:name => 'Long text', :field_format => 'text', :full_width_layout => '1',
|
||||
:tracker_ids => [1], :is_for_all => true)
|
||||
issue = Issue.find(1)
|
||||
issue.custom_field_values = {field.id => 'This is a long text'}
|
||||
issue.save!
|
||||
|
||||
get :index, :params => {
|
||||
:set_filter => 1,
|
||||
:c => ['subject', 'description', "issue.cf_#{field.id}"]
|
||||
}
|
||||
assert_response :success
|
||||
assert_select "td.issue_cf_#{field.id}", :text => 'This is a long text'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user