Subtask customfield update by Rest Api

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

This widget could not be displayed.

Hi Prakhtar,

You have a missing bracket in your JSON it should be 

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

Regards,

Peter

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.

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

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

292 views 5 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you