Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bypass emojis in API

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?

1 answer

0 votes

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:

Screen Shot 2020-01-27 at 10.28.30 AM.png

{
"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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you