Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA API comment body is not in readable format

Nitesh Kala November 22, 2022

Hi All,


We are using rest/api2/issue/issuenumber/comment. The body which is returned is not in a readable format and when we display it in a a label using asp.net it shows some special characters. could you please help us understand how to get it in a better format or make it readable

some examples 

1. tickets._+\n * *User Experience 

2. ed format.* *{color:#00875a}- DONE{color}*\n * *

2 answers

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2022

Welcome to the Atlassian Community!

I think the problem here is not that Jira is returning stuff in an unreadable format, it's that your asp.net code does not know how to read it.

The examples you've given here look like rendered text - it contains control characters that are telling you how the text is formatted (bold, coloured, etc)

Nitesh Kala November 23, 2022

do you have suggestions to fix it

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2022

You will need to code your asp.net application so that it can parse and render the markup into the format you want (or ignore it and strip the markup out)

Nitesh Kala November 23, 2022
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2022

There is not a lot more we can tell you, other than you will need to code your application to understand the markup it is fetching from Jira.

0 votes
Sreenivasaraju P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2022

Hi @Nitesh Kala ,

 

Welcome to the community .

Can you please check the field configuration schema. (which is mapped to the issue type on which you have commented). Please check renderer which is associated to the comment field in the field config schema. If it is default text renderer , please change it to wiki style render and check.

Nitesh Kala November 22, 2022

Our administrator does not allow us to change field configuration. is it possible to render the ouput recieved from the api and display it in a readable format?

Suggest an answer

Log in or Sign up to answer