Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,155
Community Members
 
Community Events
168
Community Groups

Facing an Issue while updating the value of customfield using forge app

Hi,

 

I am trying to to update the value custom field through forge app by using an api in the way shown below.

 

let newbody2 =
`{
  "fields": {
      "customfield_10033": ${parseInt(formData.newstory)}
      }     
  }`;

console.log("Body created by the issueid is= " + JSON.stringify(newbody2));
    const response2 = await api.asApp().requestJira(route`/rest/api/3/issue/PLUG-1`, {
      method: `PUT`,
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json'

     },
      body: newbody2

    });
I am able to update the value in the custom field but throwing an error Saying that "SyntaxError: Unexpected end of JSON input"
Though it is throwing the error  iam able to post the data in custom field.
please help me in resolving this.

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events