diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 79d86b1491..d3f2faf5a7 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -130,7 +130,7 @@ class ProjectsController < ApplicationController @root_projects = Project.find(:all, :conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}", :order => 'name') - @copy_project = Project.new + @copy_project = Project.copy_attributes(@project) if @copy_project @copy_project.identifier = Project.next_identifier if Setting.sequential_project_identifiers? else diff --git a/app/views/projects/copy_from_admin.html.erb b/app/views/projects/copy_from_admin.html.erb index b0ef7b84f4..e1412658c8 100644 --- a/app/views/projects/copy_from_admin.html.erb +++ b/app/views/projects/copy_from_admin.html.erb @@ -30,7 +30,7 @@ See doc/COPYRIGHT.rdoc for more details.

<%=l(:label_project_new)%>

<%= labelled_tabular_form_for @copy_project, :url => { :action => "copy" } do |f| %> - <%= render :partial => 'form', :locals => { :f => f, :project => @project, :renderTypes => true } %> + <%= render :partial => 'form', :locals => { :f => f, :project => @copy_project, :renderTypes => true } %>
<%= l(:button_copy) %> diff --git a/app/views/projects/copy_from_settings.html.erb b/app/views/projects/copy_from_settings.html.erb index 7aa53d8801..0523092d7c 100644 --- a/app/views/projects/copy_from_settings.html.erb +++ b/app/views/projects/copy_from_settings.html.erb @@ -16,7 +16,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= render :partial => "projects/form/attributes/name", :locals => { :form => f } %> <%= render :partial => "projects/form/attributes/identifier", :locals => { :form => f, - :project => @project } %> + :project => @copy_project } %> <%= render :partial => "projects/form/attributes/description", :locals => { :form => f } %> <%= render :partial => "projects/form/attributes/custom_fields", :locals => { :project => @project } %> <%= render :partial => "projects/form/attributes/responsible_id", :locals => { :form => f,