##// END OF EJS Templates
Code cleanup....
Jean-Philippe Lang -
r10149:18ed4cf373ee
parent child
Show More
@@ -775,15 +775,13 class Project < ActiveRecord::Base
775 new_issue = Issue.new
775 new_issue = Issue.new
776 new_issue.copy_from(issue, :subtasks => false)
776 new_issue.copy_from(issue, :subtasks => false)
777 new_issue.project = self
777 new_issue.project = self
778 # Reassign fixed_versions by name, since names are unique per
778 # Reassign fixed_versions by name, since names are unique per project
779 # project and the versions for self are not yet saved
780 if issue.fixed_version
779 if issue.fixed_version
781 new_issue.fixed_version = self.versions.select {|v| v.name == issue.fixed_version.name}.first
780 new_issue.fixed_version = self.versions.detect {|v| v.name == issue.fixed_version.name}
782 end
781 end
783 # Reassign the category by name, since names are unique per
782 # Reassign the category by name, since names are unique per project
784 # project and the categories for self are not yet saved
785 if issue.category
783 if issue.category
786 new_issue.category = self.issue_categories.select {|c| c.name == issue.category.name}.first
784 new_issue.category = self.issue_categories.detect {|c| c.name == issue.category.name}
787 end
785 end
788 # Parent issue
786 # Parent issue
789 if issue.parent_id
787 if issue.parent_id
General Comments 0
You need to be logged in to leave comments. Login now