When moving an issue to another project, reassign it to the category with same name if any (#1653).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1697 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+3
-1
@@ -77,7 +77,9 @@ class Issue < ActiveRecord::Base
|
||||
self.relations_to.clear
|
||||
end
|
||||
# issue is moved to another project
|
||||
self.category = nil
|
||||
# reassign to the category with same name if any
|
||||
new_category = category.nil? ? nil : new_project.issue_categories.find_by_name(category.name)
|
||||
self.category = new_category
|
||||
self.fixed_version = nil
|
||||
self.project = new_project
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user