summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-06-17 06:22:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-06-17 06:22:35 +0000
commit3e31f8167be6abb5afb5439a8c531e3107cefbf3 (patch)
tree58f5a813404e9a701e9be5327f971e4b22b76305 /app
parentf748296121db2fe7dbaab87a2275f096f5860cb7 (diff)
downloadredmine-3e31f8167be6abb5afb5439a8c531e3107cefbf3.tar.gz
redmine-3e31f8167be6abb5afb5439a8c531e3107cefbf3.zip
Cannot clear category field on copying an Issue (#28951).
git-svn-id: http://svn.redmine.org/redmine/trunk@17395 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index d37486c97..91f53c19e 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -530,7 +530,7 @@ class Issue < ActiveRecord::Base
self.project_id = p_id
end
- if project_id_changed? && attrs['category_id'].to_s == category_id_was.to_s
+ if project_id_changed? && attrs['category_id'].present? && attrs['category_id'].to_s == category_id_was.to_s
# Discard submitted category on previous project
attrs.delete('category_id')
end