Project

General

Profile

Actions

Defect #5226

closed

'can't typecast' in REST API for issues

Added by yusuke kokubo over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
2010-03-31
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

I wrote this script.

require 'rubygems'
require 'active_resource'

class Issue < ActiveResource::Base
  self.site = 'http://demo.redmine.org'
  self.user = 'LOGIN'
  self.password = 'PASSWORD'
end

Issue.find(:all).each {|i| p i}

and got bellow;

C:/Program Files/ruby-1.8/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_
support/core_ext/hash/conversions.rb:182:in `typecast_xml_value': can't typecast
 "6253" (RuntimeError)
        from C:/Program Files/ruby-1.8/lib/ruby/gems/1.8/gems/activesupport-2.3.
5/lib/active_support/core_ext/hash/conversions.rb:208:in `typecast_xml_value'
        from C:/Program Files/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/custom_re
quire.rb:31:in `inject'
...

in my local redmine,
edit [app\views\issues\index.xml.builder]

- xml.issues :type => 'array', :count => @issue_count do
+ xml.issues :type => 'array' do

I can get issues without RuntimeError.

#sorry for my bad english...


Related issues

Is duplicate of Redmine - Defect #4745: Bug in index.xml.builder (issues)ClosedEric Davis2010-02-05

Actions
Actions #1

Updated by yusuke kokubo over 14 years ago

Ruby enviroment is...

server

http://demo.redmine.org/

client

ruby 1.8.7 (2009-06-12 patchlevel 174) [i386-mswin32]
Rails 2.3.5
OS Windows XP pro

Actions #2

Updated by Eric Davis over 14 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Duplicate of #4745

Actions

Also available in: Atom PDF