I am getting output as a mix-string of paragraph and table content in a single line text
Step1: output of api
<p>testing</p><table border="1" style="width:500px"><tbody><tr><td>test</td><td>123</td></tr><tr><td>testing</td><td>456</td></tr></tbody></table><p></p><p>hi jira</p>
Step2: after conversion using html_to_jira_wiki() the output is
"testing\n\ntest123testing456hi jira\n\n"
but i need to pass data to jira api should be as below:
testing \n
| test | 123 | \n | testing | 456 | \n
hi jira
Thanks!
Dear @sirisha krishna ,
welcome to the community.
I assume you are using server not cloud, because you didn't specify.
I recommend running first REST call to get an existing comment with a table:
GET /rest/issue/{issueIdOrKey}/comment/{id}
In the answer take the value of "body" and have a look how formatting is done. Then modify and add new comments with
POST /rest/issue/{issueIdOrKey}/comment
{
"body": "replace this with your news comment",
"visibility": {
"type": "role",
"value": "Developers"
}
}
for both calls you can use query parameter expand=renderedBody to process HTML.
So long
Thomas
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.