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: 

How do you create a Jira issue with multipel line description using REST API?

Mont
Contributor
May 8, 2023

To give more context I am asking this question again. I am using version 2 API as noted in error below. I am able to create a single line description with just a string. When I start to follow the documentation below I receive error.

I've attempted to try the solution here https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/

I added this to the description of my python code snippet below but I am still receiving HTTPError: 400 Client Error: for url: https://jira.<domain>.com/jiradc/rest/api/2/issue?updateHistory=false

My code below. I've simplified this for trail and error just to test if it will work to call the JIRA API. Originally it was longer but I still receive error only when adding this to description.

issue_dict = {

"project": {

"id": '123'

},

"summary": "test summary 3",

"reporter": {"name": "id"},

"issuetype": {"name": "Task"},

"priority": {

"name": "Critical"

},

"description": {

"version": 1,

"type": "doc",

"content": []

}

}
 

 

Has anyone been able to successfully create a JIRA ticket with multiple lines in the description or details?

Also is there any additional documentation aside from what's provided in this post for including this in the python-api for jira?

 

 

 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Florian Bonniec
Community Champion
May 8, 2023

Hi @Mont 

Have you try using "\n" for new line ?

Also I don't think you need to use the type etc..

"description": "1er line \n 2nd line"

Maybe "\\n"

Regards

Deleted user
May 8, 2023

Solution provided to OP in this thread.

OP is reading the wrong documentation for their Jira product.