hello i searched on the website and i found to get the html rendred using the jira api i just need to give an url like this :
https://jira/jira/rest/api/2/issue/403165/comment?expand=renderedFields
but this is returning the same thing if i take off the ?expand=renderedFields
me i just want to get the the html of the comments body is there any way to do this ? thank you
Community moderators have prevented the ability to post new answers.
Hello @Zakaria RZ ,
you could also use the following URL, which can be an easy solution
https://jira/jira/rest/api/2/issue/403165/comment?expand=renderedBody
Regards
Chaitanya Nighot
Hello Zakaria,
The API request for comments with the added expand=renderFields does not display the HTML code of the fields. What this expansion does it the following:
renderedFields = HTML-rendered field values in the response (Not HTML code)
Additionally you can find more about the renderedFields within the documentation at Class Issue.RenderedFields along with the API requests at Jira REST API (See expansion). There is additional data for API requests on Get Comments where examples are provided for available field names.
I hope this clarifies how to access data through API requests.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Stephen
Thank you for your answer
i figured out how to get the HTML of the comments so what i did was :
first a rest request using the Jira Api
https://jira/jira/rest/api/2/issue/"+id+"?expand=renderedFields"
the id is the issue id from where i want to get comments , the result is a lot of fields and also there is comment field which contain a body field inside where i can finally get the HTML format of the comment .
hope it helps someone over there if he is facing the same problem !
Have a great day Stephen
Regards
Zakaria Rihane
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Stephen Sifers I use the .NET SDK to get tickets from our JIRA instance. How to get the HTML output with the SDK? Will need it for custom fields mainly....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.