Forums

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

i am trying to update description of issue while creating ticket via api , its not updating

Abhinav Jha September 6, 2023

Hi 
While creating a jira issue via rest api the description field is not getting updated .

payload = {
                "project": {
                    "id": project_id
                },
                "issuetype": {
                    "id": issue_type_id
                },
                # "customfield_10010": "itvendor/requestchange",
                # "customfield_10010": "Request a change",
                # "requestTypeId": request_type,
                "summary": summary,
                "description": {
                    "version": 1,
                    "type": "doc",
                    "content": [{
                        "type": "paragraph",
                        "content": [{
                            "type": "text",
                            "text": description
                        }]
                    }],
                },

            }
i am using this payload , any help or suggestions are much appriciated.

1 answer

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Champion
September 6, 2023

Hi @Abhinav Jha 

Please use this guide https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/ to create your JSON. I would expect the description to have a JSON similar to:

"description": "A description is many lines of text\n separated by\n line feeds"
Abhinav Jha September 7, 2023

this format is giving
{u'errorMessages': [u'Invalid request payload. Refer to the REST API documentation and try again.']}

Alex Koxaras _Relational_
Community Champion
September 7, 2023

@Abhinav Jha are you using postman or you are trying to update via automation rule?

Abhinav Jha September 7, 2023

@nurac thanks it worked 

just wondering why its not updating at the time of issue creation 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events