Hello all —
We are using a Python script to retrieve the summary and description from Jira issues, and then publishing them into our private wiki. Since Jira fields now store rich text as ADF (Atlassian Document Format), we are losing list bullet items and other formatting.
My question:
Does the Jira REST API provide a supported endpoint to convert ADF → wiki markup, Markdown, HTML or plaintext? If yes, could someone share endpoint/usage example? If not, what is the recommended approach (official or best practice) for this kind of conversion?
Thanks in advance for any pointers, sample code or library suggestions.
Hello @Asier Vadillo
In addition to what @Andy Rusnak said, if you don't want your rich text fields returned in ADF format, then don't use the v3 REST API endpoints... use the v2 REST API counterparts, which return all rich text field content in wiki markdown format by default.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again @Sunny Ape
I was checking when if it will be deprecated/kill the v2 version of the API and could not find it. Do you know when they are going to kill the v2 version, if they are going to even do it?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
and could not find it
That's because it doesn't exist @Asier Vadillo :)
Rumours about the pending demise of the entire v2 REST API and all its endpoints have been floating around for years.
Atlassian have acknowledged there are still many limitations to the practical implementation of ADF for developers (as per JRACLOUD-77436 ), so all they keep saying on the topic is, essentially "We're going to keep developing the two API versions in parallel until such time as we tell you otherwise".
So, use it until you hear otherwise.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Asier,
Thanks for posting the question to the Community and I hope you are doing well!
Currently there is not a REST API endpoint to convert between these various formats however we do have JRACLOUD-77436 which requests this type of functionality. I would encourage you to vote and watch JRACLOUD-77436 to let our team know this is something you are interested in and get updates on it.
In terms of a workaround, there is a workaround mentioned on JRACLOUD-77436 by leveraging the 'expand' parameter of the normal GET issues or GET comments endpoints. For example, when getting an issue field you get the issue and use the "expand=renderedFields" which will return an HTML rendition of the fields as outlined within the Jira Cloud REST API documentation.
Would that be something that might work for you?
Best,
Andy
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.