hi,
I am using Atlassian SDK to create issue. I have a problem setting a value for a custom field. It always ends with this error :
"customfield_15870":"Invalid format. Expected an array of objects with either an Option ID or an existing value."
I use something like this to set the custom field value
string name = "my_field_name";
string value = "my_field_value";
issue.CustomFields.Add( name, value);
I also tried to create the value like this:
string value = $"{{\"value\":\"{value}\"}}";
string value = $"{{\"id\":\"{value_id}\"}}";
but nothing helped. I also tried to use the issue.CustomFields.AddArray method , but it also failed.
This problem only occurs with one particular custom field. There is no problem with the others.
Thanks for any advice.
Solved via REST API. The problematic field was the custom field "cascading select". I do not think there is a way to set it using the Atlassian SDK, but the REST API can be used as a workaround.
Hi @Andrej191 -- Welcome to the Atlassian Community!
As you solved your own question, do you want to mark this one as "answered"? That will help others in the community with similar needs find solutions faster. Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.