BUG: Rest API v3 Endpoint "issue"

Mathias December 17, 2019

I just found out, that the issue endpoint of the v3 API of Jira Cloud will not have any problems to create an issue with the following description field:

{
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "simple short description"
}
]
}
]
}

 Also the ADF Document builder renders it correct, the description will not be shown in the created ticket.

This is due to the additional square brackets in the lines 4 and 14. If you deleted those brackets the description will be shown.

Please create a bug ticket for this to either deal with descriptions in this form, or to throw a 400 status code and add adequate information in the ErrorCollection.

1 answer

1 accepted

0 votes
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 18, 2019

Hello @Mathias ,

Thanks for reaching out to the community, and looking this over I was not able to reproduce the behavior you are describing.

What is your full post syntax?

And are you seeing any error returned from the POST?

Testing this out I did a curl with the following data package to contain the full requirement to create the issue and everything came through without issue:

{
"fields": {
"project": {
"key": "EXE"
},
"summary": "test bug summary",
"description": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Testing Description"
}
]
}
]
},
"issuetype": {
"name": "Bug"
}
}
}

so the full curl is in this format:

curl -D- -u USER@email.com:<API_TOKEN> -X POST --data '{"fields":{"project":{"key":"EXE"},"summary":"test bug summary","description": {"version": 1,"type": "doc","content": [{"type": "paragraph","content": [{"type": "text","text": "Testing Description"}]}]},"issuetype":{"name":"Bug"}}}' -H "Content-Type: application/json" "https://<BASE_URL>.atlassian.net/rest/api/3/issue/"
Mathias December 19, 2019

Hi @Earl McCutcheon ,

thanks for taking time to check the problem. I can't reproduce the problem now either...

I got no errors back from the system, the response held the key of the newly created issue and the issue was also present in Jira, but as I said, it was missing the description...

Unfortunately I did not commit the "broken" state of my code to GIT and I am currently unable to replicate it again.

So nevermind my post and I wish you happy holidays!

Like Earl McCutcheon likes this
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 19, 2019

Hi @Mathias ,

Thanks for the follow up and I'm glad to hear your all set.  It is odd that it started working randomly without change, so there could have been a bug that was fixed between you encountering the error and testing, but if so I was not able to locate which one it was, make sure to reach back out if you see this happen again and we can take a look again.

Happy holidays to you as well :)

Regards,
Earl

Suggest an answer

Log in or Sign up to answer