Hi everyone!
We use a custom script postfunction to create new issue at specific transition where custom fields' values are copied from initial issue.
All in all it works fine but now I need to update it with some select list (single choice) fields values.
All good when I define value as "customfield_11111" : {"value" : "Red"}
But in some cases I don't know whether field is filled in the initial issue or not, so I have to include an option when value in new issue is null and I have no idea how to define that.
Options as "customfield_11111" : {"value" : "null"} , "customfield_11111" : null , etc do not work due to 400 Error.
I would appreciate any idea.
Thanks in advance.
If you do not add the customfield_11111 at all, it will be null unless you have a default value for that field.
On the other hand, if this is a REST service call and you use the PUT
method for /rest/api/2/issue/{issueIdOrKey} with json below
{
"fields": {
"customfield_11111": null
}
}
then, it should set/update the field with a null value.
Hi @Tuncay Senturk _Snapbytes_
I cannot exclude customfield_11111 field from Json because I don't know whether is will be used or not.
Unfortunately solution mentioned above does not suit me because I get 500 Error. Maybe something is wrong with the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
500 is a server error, did you have a chance to check the logs?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep I know that it's Internal Server Error message. I only see this code or error and no addiitonal info.
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.