mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 22:05:56 +01:00
Fixed rendering of multivalued custom fields in the issue history (#19225).
git-svn-id: http://svn.redmine.org/redmine/trunk@14054 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -320,15 +320,19 @@ module IssuesHelper
|
||||
end
|
||||
strings << show_detail(detail, no_html, options)
|
||||
end
|
||||
values_by_field.each do |field, changes|
|
||||
detail = JournalDetail.new(:property => 'cf', :prop_key => field.id.to_s)
|
||||
detail.instance_variable_set "@custom_field", field
|
||||
if changes[:added].any?
|
||||
detail.value = changes[:added]
|
||||
strings << show_detail(detail, no_html, options)
|
||||
elsif changes[:deleted].any?
|
||||
detail.old_value = changes[:deleted]
|
||||
strings << show_detail(detail, no_html, options)
|
||||
if values_by_field.present?
|
||||
multiple_values_detail = Struct.new(:property, :prop_key, :custom_field, :old_value, :value)
|
||||
values_by_field.each do |field, changes|
|
||||
if changes[:added].any?
|
||||
detail = multiple_values_detail.new('cf', field.id.to_s, field)
|
||||
detail.value = changes[:added]
|
||||
strings << show_detail(detail, no_html, options)
|
||||
end
|
||||
if changes[:deleted].any?
|
||||
detail = multiple_values_detail.new('cf', field.id.to_s, field)
|
||||
detail.old_value = changes[:deleted]
|
||||
strings << show_detail(detail, no_html, options)
|
||||
end
|
||||
end
|
||||
end
|
||||
strings
|
||||
|
||||
Reference in New Issue
Block a user