Use html-code in Issue

Carsten Stepan March 26, 2024

I'am in the task of migrating some tickets from our old system to Jira. In the old one we have plenty of HTML-code. When I retrieve the issues from that server, I get a descriotion similar to this for instance:

\n\tHallo Welt

 When I manually create a new issue in my board containing that description, everything works foine (despite the text not being formated, as the parser can't interoret HTML-markdown, apparently). 


However when doing this using the REST-API, I get an HTTP (Bad Request)-response:


var description = "\n\tHallo Welt";

var data = $@"{{
""fields"": {{
""id"": 1234
""summary"": ""MyTitle"",
""description"": ""{ description }"",
""issuetype"": {{
""name"": ""Bug""
var content = new StringContent(data, Encoding.UTF8, "application/json");
var response = await httpClient.PostAsync($" { host }/issue", content);
var responseText = await response.Content.ReadAsStringAsync();

 I also tried to convert the HTML to markdown. However markdown-support also seems pretty limited in JIRA.

1 answer

1 accepted

1 vote
Answer accepted
Carsten Stepan March 26, 2024

Oooooutsh, that hurts.. had to escape the linebreaks \n with \\n and the tabs \t with \\t in the `description`. 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events