Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can not update CF Issue Picker Field values using REST API.

Deleted user March 27, 2018

Hi,

 

We create a custom field type is "CF Issue Picker" using plugin i.e https://marketplace.atlassian.com/plugins/com.as.cf.issuepicker.cf-issuepicker/server/overview 

But, we are not able to update respective field value using REST API.

 

Trying to update or delete values in field "Parent Specification" (customfield_10601). Doing this via REST API, e.g. to update, I'm sending this:

{ "fields": { "customfield_10601": "SPEC-4577" }}

However, these requests return "HTTP 500" error:

{ "errorMessages": [ "Internal server error" ], "errors": {}}

The only operation that works is above operation ONLY when the field is empty. So if a field already has some value, I cannot change or remove it, but if it's empty, then I can add a single value.

The schema for this field is strange - the type is "any" while this is an array field. Also, it only allows "set" operation:

"customfield_10601": {
"required": false,
"schema": { "type": "any", "custom": "com.as.cf.issuepicker.cf-issuepicker:cf-issue-picker", "customId": 10601 },
"name": "Parent Specification",
"operations": [
"set"
]
},

 

Can you please help us how to update using REST API.

1 answer

0 votes
Anuj Sapate
Contributor
May 4, 2018

The custom field is capable of holding multiple values same like Label/ Components fields available in JIRA. Hence you have to send the values the same way you updates Label/Components. 

So the possible way to send that data through the REST call will be like this:

"customfield_10601" : [ "SPEC-4577" , "SPEC-4578" ] 

 Let me know if it works for you!

egid73
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 11, 2018

I have the same problem and your advice didn't work for me. 

parthiban_selvaraj October 27, 2019

Hi,

 

Did you get any update for your query.

 

Thanks,

Parthi

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events