summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-08 09:46:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-03-08 09:46:21 +0000
commit7879d8e4dcb4f2d2bb4e03499a72939c1848c016 (patch)
tree6d605296e460a2352920b13bd55124780deb8669 /app/helpers
parent735c3ae5c524432a5b99c91d9b0e6a2a6fb99016 (diff)
downloadredmine-7879d8e4dcb4f2d2bb4e03499a72939c1848c016.tar.gz
redmine-7879d8e4dcb4f2d2bb4e03499a72939c1848c016.zip
Merged r14054 (#19225).
git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14064 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/issues_helper.rb22
1 files changed, 13 insertions, 9 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 3870a066d..8e951596c 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -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