Actions
Defect #6403
closedUpdating an issue with custom fields fails
Defect #6403:
Updating an issue with custom fields fails
Resolution:
Fixed
Affected version:
Description
If I run the following code
require 'rubygems'
require 'active_resource'
# Issue model on the client side
class Issue < ActiveResource::Base
self.site = 'http://redmine.server/'
self.user = 'foo'
self.password = 'bar'
end
# Updating an issue
issue = Issue.find(1)
issue.subject = 'REST API'
issue.save
it fails on issue.save with the following error
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/conversions.rb:163:in `to_xml': Not all elements respond to to_xml (RuntimeError)I suspect it has something to do with custom fields because if I do
# Updating an issue
issue = Issue.find(1)
issue.subject = 'REST API'
issue.custom_fields = nil
issue.save
it works !
Actions