Project

General

Profile

Actions

Defect #6403

closed

Updating an issue with custom fields fails

Added by Stéphane Dubois about 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Category:
REST API
Target version:
Start date:
2010-09-15
Due date:
% Done:

0%

Estimated time:
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 !


Related issues

Related to Redmine - Defect #7377: Updating an Issue with custom fields set fails in V.1.1.0Closed2011-01-19

Actions
Actions

Also available in: Atom PDF