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"": {{
""project"":
{{
""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.
Oooooutsh, that hurts.. had to escape the linebreaks \n with \\n and the tabs \t with \\t in the `description`.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.