Following the example on [https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Add+Comment], I cannot add a comment contailing a \n newline character. I always receive
POST http://10.28.37.16:8080/rest/api/2/issue/DEMO-12/comment returned a response status of 400 Bad Request
when attempting to add the comment either using the first or secont approach.
Removing newlines from a larger comment makes it significantly illegible - therefore my question - why is that happening?
Many thanks for any suggestions or ideas!
(1) the <br> does not work as it essentially gets excaped,
(2) the \\ (I've seen also \\\\ in one post) does not work either,
(3) escaping the \n by \\\\n (four slashes; in Java) DOES WORK!!!! :)
Many thanks for your insight!
(hope this thread becomes easily googleable for those having the same problem).
Try the following,
check whether your comment's renderer is wiki style renderer, If so try adding '\\' instead '\n', '\\' is used for line break in comments(when wiki style renderer is enabled).
Try this, may work but I dono, and I have not tried,
1) Try using <br> tags, or
2) Try encoding the new line char.
The above two suggestions may or may not work.
Hope this helps.
Hi Everyone! My name is Mina and I am on Atlassian’s Ecosystems Marketing team. Our team is focused on our technology partnerships and marketplace apps. One of Atlassian’s partners is Slack, who ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events