Defect #22628
Updated by Toshi MARUYAMA over 8 years ago
Hey! I'm trying to create an issus in ruby script with one custom_field. I've created custom field (down drop list with 5 values) with web interface. I tried to do this according to wiki: [[Rest_api_with_ruby]], "Using the REST API with Ruby":http://www.redmine.org/projects/redmine/wiki/Rest_api_with_ruby , but I think this wiki page is out of date. I searched for older tickets, found that 'custom_field_values' isn't used anymore, the new approach is to do this with array 'custom_fields' and by update operation (get issue by id and set values in custom_fields array). The example given in wiki throws error: <pre>ActiveResource::BadRequest: Failed. Response code = 400. Response message = Bad Reques</pre> The best solution would be to assign the right value while creating issue (one save operation), I don't want to create it in first step, and then set the right value of custom field with update method (two save operations). Is it possible? Please, correct the wiki page if it's deprecated. Thx for help. gary