The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Subtask customfield update by Rest Api

Prakhar
October 14, 2016

Hi ,

Can anyone suggest how to update customfields of a subtask by Rest api script.

I am trying by api/2/issue/{issueorkey}   and in put statement i am posting like :

{"fields":
{
"customfield_10967": "ABC"
}

 

however it gives below error :

 

{
"errorMessages": [
"Unexpected end-of-input: expected close marker for OBJECT (from [Source: com.quisapps.jira.fieldsecurity.filter.RequestWrapper$1@d037060; line: 1, column: 0])\n at [Source: com.quisapps.jira.fieldsecurity.filter.RequestWrapper$1@d037060; line: 4, column: 44]"
]
}

 

My Customfield is of textarea type.

please suggest.

 

Thank you

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Peter Geshev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 14, 2016

Hi Prakhtar,

You have a missing bracket in your JSON it should be 

{"fields": 
{
"customfield_10967": "ABC"
}}

Regards,

Peter

Prakhar
October 14, 2016

Thanks Peter , Now I am getting this :

 

{
"errorMessages": [],
"errors": {
"customfield_12621": "Field 'customfield_12621' cannot be set. It is not on the appropriate screen, or unknown."
}
}

 

this is newly created customfield of the type textarea and currently not on front end.

Peter Geshev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 14, 2016

In order to be able to set the value of the custom field you will have to set its configuration right(context and screens) first. If it is not visible in the front end you wont be able to modify its value

TAGS
AUG Leaders

Atlassian Community Events