Fixed: Unable to set custom fields for versions using the REST API (#13850).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11760 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
92dcaeb472
commit
5a3b903733
3 files changed
+36
-1
No files matched your search
@@ -147,4 +147,15 @@ module ObjectHelpers
|
||||
attachment.save!
|
||||
attachment
|
||||
end
|
||||
|
||||
def CustomField.generate!(attributes={})
|
||||
@generated_custom_field_name ||= 'Custom field 0'
|
||||
@generated_custom_field_name.succ!
|
||||
field = new(attributes)
|
||||
field.name = @generated_custom_field_name.dup if field.name.blank?
|
||||
field.field_format = 'string' if field.field_format.blank?
|
||||
yield field if block_given?
|
||||
field.save!
|
||||
field
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user