How to Set Formatted Description in JIRA using API (Rich Text Guide)

During my Jirafication work, I encountered a scenario where a Sonar issue description was not rendered properly while creating a JIRA story. Instead of formatted content, it appeared as plain text.

To troubleshoot this, I first replicated the steps manually and then inspected the request via the browser’s network console. Here are the key findings:










1. To make text bold: just put the text between *.

For Example: 

Input Text: This isssue is related to Thread.

Expected Output: *This isssue is related to Thread*

This will make this line bold when you will hit with your API.

API: {{JIRA_URL}}/ rest/api/latest/issue

Method: POST

{

"fields": {

"description": "*This isssue is related to Thread*"

}

}

2. To make text in color: put the color code like this:

"{color:#0747a6}This isssue is related to Thread.{color}"

For Example: 

Input Text: This isssue is related to Thread.

Expected Output: This isssue is related to Thread


3. To put Java code: "{code:java} your java code {code}"

As of now, I have just used these formattings. I will update others, if will use them.



Post a Comment

0 Comments