While using JIRA Cloud REST API V3.0, description is coming JIRA ADF format. Is there a way to convert this format to markdown syntax, html so that same can be stored in database?
tried looking at pyadf library. However, it has functions to convert text to ADF. Didn't find anything to convert from ADF to other formats.
Just in case anyone else hits this thread, what i ended up doing was expanding the json response using renderedFields. This gives description in html format. then use python library markdownify to convert the output to markdown syntax.
It is working fine for my usecase
I used ChatGPT to write this code to fetch issue and do a pretty minimal conversion to Markdown. Hopefully Jira will make this a stock feature and save me some time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Vishal Biyani
Please check this thread here about same requirement https://community.atlassian.com/t5/Jira-questions/convert-jira-ADF-formatted-description-in-HTML-format/qaq-p/1750152
And there is an open issue reported on this here https://jira.atlassian.com/browse/JRACLOUD-77436
Please check the comments that might be helpful.
Regards,
Vishwas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you want the Issue Description to be posted in Markdown format via API. Please correct me if I'm wrong here.
Description field follows Atlassian Document Format content
Please follow the reference here
https://developer.atlassian.com/cloud/jira/platform/apis/document/structure
Let me know how need the format
Thanks,
Pramodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your quick response.
Question is How to parse though content node?
Do i need to create a custom json parser that reads through all the content nodes?
if so, when i hit say Node - hardbreak, what needs to be done to convert it to markdown syntax?
or when Node - table comes, what needs to be done to convert it to equivalent markdown syntax?
is there any handy reference that i can go through for this conversion?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.