In our JIRA setup as we are using Default Text renderer for rendering the comments field through REST API, our objective is to get the output without the markup notations in a more readable format.
This is some of the code snippets which we have used for the asp.net application where the comments will be displayed
//API endpoint to fetch the comments for an issue
string restUrl = String.Format(“{0}rest/api/2/issue/” + TicketNumber + “/comment?expand=properties”, connection.GetUrl());
//Deserialize the JSON response from the API
dynamic _sData = JsonConvert.DeserializeObject(str);
//Adding the comments to a Gridview
foreach (var comment in _sData.comments)
{
dt.Rows.Add(comment.id,comment.author.displayName.ToString() + " added a comment on " + date + , comment.body.ToString());
}
But the output contains markup notations ,these are some of the examples
- tickets._+\n * *User Experience
- ed format.* {color:#00875a}- DONE{color}\n * *
**JIRA admin doesn’t allow us to change the renderer to WIKI renderer