diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-04-11 17:11:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-04-11 17:11:59 +0000 |
commit | bb2c6f607610442d6be8de893ff15ff715ceb0d7 (patch) | |
tree | df597e2f977e01a667940205d1285bf601c303e8 /lib/plugins | |
parent | bf60f4def06c57b636af97b45772bd41f1c5cd8c (diff) | |
download | redmine-bb2c6f607610442d6be8de893ff15ff715ceb0d7.tar.gz redmine-bb2c6f607610442d6be8de893ff15ff715ceb0d7.zip |
Fixed that subtasks lose their custom fields when copying an issue to a different project (#22342).
git-svn-id: http://svn.redmine.org/redmine/trunk@15318 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb index 1cde646e9..050e442b4 100644 --- a/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb +++ b/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb @@ -151,6 +151,14 @@ module Redmine true end + def reassign_custom_field_values + if @custom_field_values + values = @custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} + @custom_field_values = nil + self.custom_field_values = values + end + end + def reset_custom_values! @custom_field_values = nil @custom_field_values_changed = true |