mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 03:36:36 +02:00
Create custom field by copy (#34307).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@20692 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -98,6 +98,9 @@ class CustomFieldsController < ApplicationController
|
||||
if @custom_field.nil?
|
||||
render :action => 'select_type'
|
||||
else
|
||||
if params[:copy].present? && (@copy_from = CustomField.find_by(id: params[:copy]))
|
||||
@custom_field.copy_from(@copy_from)
|
||||
end
|
||||
@custom_field.safe_attributes = params[:custom_field]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user