It is possible to set a new value if field is null, but it is not possible to change an existing value, always got 500 server error.
This error in JIRA logs:
/rest/api/2/issue/12300 [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service javax.ws.rs.WebApplicationException ... Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
I tried all values: null, [], "" - none of them works.
curl -D- \ -u user:password -X PUT \ --data '{ "update": {"customfield_12100": [{"set": ""}] }}' \ -H "Content-Type: application/json" \ http://localhost:8080/rest/api/2/issue/12300
You'll need to delve into the behaviour of the issue picker field type. At a glance, it's expecting a string, not an array, so you'll need to construct a string of the type it is expecting from your array.
If field is blank (null), you are right, I can set field's value by
'{ "update": {"customfield_12100": [{"set": "Some-valid-issue-key"}] }}'
But after (when field is not blank) this gives me 500 error.
'{ "update": {"customfield_12100": [{"set": "Another-valid-issue-key"}] }}'
So I sad, I tried all types (null, empty array, array with values, string) - all give me 500 error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Fedor Stepanov - did you figure a workaround for this? I have the same issue updating a Kepler custom issue and the CREATE/INSERT works but the UPDATE gives me the error that you were getting. The JIRA CLI works but not the REST API.
We tried to set it to NULL (tried to make it go away) so that we can insert a new value but the update to NULL is giving us the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.