Getting below error when creating an issue with special characters in description like '£' and '@'.
{\"errorMessages\":[\"There was an error parsing JSON. Check that your request body is valid.\"]}
So can anyone help on how can we create issues with special characters in the description using api?
If you are getting the problem when using Jira Automation and doing a POST webhook, the error is probably in the command:
"summary": "{{issue.summary}}"
replace with:
"summary": "{{issue.summary.jsonEncode}}"
Still getting same error without any special character as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We found out the hard way that Atlassian REST APIs are super-sensitive to non-alpha-numeric characters. The REST APIs are just not robust enough to trust so you may find a way to create an issue with a special character in it but you will likely have problems elsewhere down the line.
So my advice is: Avoid special characters like the plague.
Instead, keep the summary (I presume) "detail light" and put all the messy stuff in the description.
Atlassian may be about to release a whole new set of super amazing reliable robust function-rich REST APIs (because the current set for use with the cloud are not up to the job of competing with Server or Data Center), but I wouldn't hold my breath!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Atul Aggarwal ,
No problems while creating Jira issues containing '£' or '@' when using REST API (https://docs.atlassian.com/software/jira/docs/api/REST/8.13.0/):
Request
curl -u admin:admin \
-H 'Content-type: application/json' \
-d '{"fields": {"project": {"id": "10100"},"summary": "Pound sign £", "description": "Pound sign £", "issuetype": {"id": "10000"}}}' \
http://localhost:8080/jira/rest/api/2/issue
{"id":"10201","key":"FOO-1","self":"http://localhost:8080/jira/rest/api/2/issue/10201"}
Request
curl -u admin:admin \
-H 'Content-type: application/json' \
-d '{"fields": {"project": {"id": "10100"},"summary": "At sign @", "description": "At sign @", "issuetype": {"id": "10000"}}}' \
http://localhost:8080/jira/rest/api/2/issue
{"id":"10202","key":"FOO-2","self":"http://localhost:8080/jira/rest/api/2/issue/10202"}
Jira Base URL in example above http://localhost:8080/jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.