Defect #22628
closedCreate issue with custom fields with ruby API
0%
Description
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, 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:
ActiveResource::BadRequest: Failed. Response code = 400. Response message = Bad Reques
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