ChiliProject is not maintained anymore.
          Please be advised that there will be no more updates.
        
        
          We do not recommend that you setup new ChiliProject instances and
          we urge all existing users to migrate their data to a maintained
          system, e.g. Redmine. We will
          provide a migration script later. In the meantime, you can use the
          instructions by
          Christian Daehn.
        
       
      
      Forums » Develop » 
    
    
    
    
 Error using REST API and customfields
Error using REST API and customfields
Added by Wiki Bit at 2012-10-01 10:22 am
Hi,
	I've an issue while using the REST API, through a ruby script
	the ruby script works fine without the line "  :custom_field_values => {"1" => "testcustomfield"},"
	but as soon as I add that line (to add some info to custom fields) like this :
	issue = Issue.new(
  :subject => "subject test",
  :description => v_desc,
  :custom_field_values => {"1" => "testcustomfield"},
  :project_id => 23
)
	I get the following error
	/usr/local/lib/ruby/gems/1.9.1/gems/activeresource-2.3.14/lib/active_resource/connection.rb:206:in `handle_response': Failed with 500 Internal Server Error (ActiveResource::ServerError)
    from /usr/local/lib/ruby/gems/1.9.1/gems/activeresource-2.3.14/lib/active_resource/connection.rb:173:in `request'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activeresource-2.3.14/lib/active_resource/connection.rb:156:in `post'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activeresource-2.3.14/lib/active_resource/base.rb:1084:in `create'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activeresource-2.3.14/lib/active_resource/base.rb:867:in `save'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activeresource-2.3.14/lib/active_resource/validations.rb:259:in `save_with_validation'
    from addissue_2close.rb:63:in `<main>'
	Customfield "1" does exist as a global custom field in chili for issue trackers
	any ideas anyone ?
	thanks
 
 
  
    
      
      
      
    
  
  Hi,
	I struggled with the REST API, too. Currently the API seems to be in development...
	Do you still have the problem?
	ciao,
Chris
 
  
    
      
      
      
    
  
  This looks like it should work, I haven't worked much with the API though. Could you check if :custom_field_values => {:1 => "testcustomfield"}, works?
	Furthermore, could you check the logs on the server you are trying to write to and post the error here?