1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-30 04:09:38 +00:00

Cannot clear category field on copying an Issue (#28951).

git-svn-id: http://svn.redmine.org/redmine/trunk@17395 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2018-06-17 06:22:35 +00:00
parent f748296121
commit 3e31f8167b

View File

@ -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