Project

General

Profile

Patch #20512 » redmine_copy_project.patch

Project.copy_from - Ondřej Ezr, 2015-08-11 18:12

View differences:

app/models/project.rb
751 751
    # clear unique attributes
752 752
    attributes = project.attributes.dup.except('id', 'name', 'identifier', 'status', 'parent_id', 'lft', 'rgt')
753 753
    copy = Project.new(attributes)
754
    copy.enabled_modules = project.enabled_modules
754
    copy.enabled_module_names = project.enabled_module_names
755 755
    copy.trackers = project.trackers
756 756
    copy.custom_values = project.custom_values.collect {|v| v.clone}
757 757
    copy.issue_custom_fields = project.issue_custom_fields
    (1-1/1)