Currently i'm trying to do this in python but am open to using something else as long as its not too complex.
The issue description field is sent in Atlassian's Document Format which looks something like this:
{'version': 1, 'type': 'doc', 'content': [{'type': 'paragraph', 'content': [{'type': 'text', 'text': 'and i cant lie'}]}]}
The more paragraphs and formatting that is done for the issues description the more complex the structure will be. Is there an easy way to parse/render this down to something viewable? I do not want to do this manually and cant seem to find anything to help in handling this. Im also assuming that comments might be handled this way as well.
There has to be a plugin to make this json format viewable and also a wysiwyg editor, just cant seem to find anything on it
you can use rest/agile/1.0/board/1/issue?jql=key = <Key> endpoint to get parsed description. Other than that I couldn't find any way to parse the description.
For Python there is this peice of code that can parse the description for the most part:
def get_text(content):
result = ''
for i in content:
if 'content' in i:
if isinstance(i['content'],list):
result += get_text(i['content'])
elif 'text' in i:
result += i['text']
elif 'attrs' in i:
result += i['attrs']['url']
return result
print(get_text(d['content']))
Hi, did you find any way? please help, I'm trying to do the same!
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.