Defect #16887 » RM_16887_details_to_strings_reloads_custom_fields_many_times.diff
| app/helpers/issues_helper.rb (copie de travail) | ||
|---|---|---|
|
options[:only_path] = (options[:only_path] == false ? false : true)
|
||
|
strings = []
|
||
|
values_by_field = {}
|
||
|
# Specific : do not reload the custom field multiple time
|
||
|
cfs = {}
|
||
|
details.each do |detail|
|
||
|
if detail.property == 'cf'
|
||
|
field_id = detail.prop_key
|
||
|
field = CustomField.find_by_id(field_id)
|
||
|
# Specific
|
||
|
field = cfs[field_id]
|
||
|
if field.nil?
|
||
|
field = CustomField.find_by_id(field_id)
|
||
|
cfs[field_id] = field
|
||
|
end
|
||
|
# END -- Specific
|
||
|
if field && field.multiple?
|
||
|
values_by_field[field_id] ||= {:added => [], :deleted => []}
|
||
|
if detail.old_value
|
||