Hello,
I have been to publish tickets through the Jira Cloud API.
My description contains :p and when I'm creating the ticket it is showing as an emoji.
I'm using python so If I want to escape using backslash I'd get two backslashes as output.
Any ideas?
Hello @Batata Saeed ,
Thanks for reaching out, and to escape the characters that are being converted to emojis in your API posts there are a few options.
First if you switch to use the New Jira Issue View , the system now uses a Markdown editor instead fo the Markup editor used in the classic view and the auto conversion of special characters like ":P" will no longer convert to and use a new ":emoji:" formatting instead for the conversions.
Alternatively using the Classic Issue view, you can disable the wiki-style render for the text fields that you are using in your API calls to avoide posting a special characters as emojis on a conversion by switching the field render to text, or you could add noformat or code macro blocks around any syntax you are posting to make sure that the contents are not modified via the Wiki markup.
The following EXE uses both a noformat and Code block macro, and would only encapsulate the ":P" and ":)" values in a comment but I would recomend adding one of these formatting options around the full section of any code snippet you are planning to post to a issue. The following is the data package for a "POST /rest/api/3/issue/{issueIdOrKey}/comment" and would render like the screenshot below:
{
"body": {
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "TEST EMOJI POST with noformat and Code blocks"
}
]
},
{
"type": "codeBlock",
"attrs": {},
"content": [
{
"type": "text",
"text": ":P"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " "
}
]
},
{
"type": "codeBlock",
"attrs": {
"language": "java"
},
"content": [
{
"type": "text",
"text": ":)"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "additional words outside formatting"
}
]
}
]
}
}
Regards,
Earl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.