Hi,
I found this useful Link: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Create+Issue explaining in general how to add values for custom fields using the REST API. It works well for "normal" custom fields.
I have a problem when I want to set the value for a custom field of type "Tempo Account". The field is available on the desired screen and gets displayed as a dropdown select list. So I guessed that I can set the value with a JSON like this:
{"fields":{"summary":"Some Summary","project":{"id":"10140"},"issuetype":{"id":"11"},"priority":{"id":"3"},"customfield_10130":[{"value":"Some Value 1"},{"value":"Some Value 2"},{"value":"Some Value 3"},{"value":"Some Value 4"}],"parent":{"id":"45561"},"fixVersions":[{"released":"false","archived":"false","description":"Update 12.02.2013","name":"Some Version","self":"http://my.url/rest/api/latest/version/12267"}],"customfield_10242":{"value":"970155"}}}
Where customfield_10242 is the field of type "Tempo Account".
When I submit this request to JIRA I get the following error:
{"customfield_10242":"Operation value must be a string"}
Next guess was to change the JSON as follows:
{"fields":{"summary":"Some Summary","project":{"id":"10140"},"issuetype":{"id":"11"},"priority":{"id":"3"},"customfield_10130":[{"value":"Some Value 1"},{"value":"Some Value 2"},{"value":"Some Value 3"},{"value":"Some Value 4"}],"parent":{"id":"45561"},"fixVersions":[{"released":"false","archived":"false","description":"Update 12.02.2013","name":"Some Version","self":"http://my.url/rest/api/latest/version/12267"}],"customfield_10242":"970155"}}
Using this I do not get an error but the issue will be created without filling the value for the custom field.
Thank you for any hint that points me to the right direction!
Regards,
Christian