fix broken identifier updating

Conflicts:
	app/views/projects/copy_from_admin.html.erb
pull/495/head
jwollert 11 years ago
parent e5eb8e6c42
commit 3d6c8de390
  1. 2
      app/controllers/projects_controller.rb
  2. 2
      app/views/projects/copy_from_admin.html.erb
  3. 2
      app/views/projects/copy_from_settings.html.erb

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

@ -30,7 +30,7 @@ See doc/COPYRIGHT.rdoc for more details.
<h2><%=l(:label_project_new)%></h2>
<%= 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 } %>
<fieldset class="box">
<legend><%= l(:button_copy) %></legend>

@ -16,7 +16,7 @@ See doc/COPYRIGHT.rdoc for more details.
<div class="copy box">
<%= 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,

Loading…
Cancel
Save