0

I am trying to create a issue in Jira with description containing a dataframe ,i am trying to display the dataframe data in table style but it looks like below when issue is created,display of header is not matching with values

enter image description here description='''{0} '''.format(df)

mallik
  • 1

1 Answers1

0

I've a method in https://github.com/dren79/JiraScripting_public - https://github.com/dren79/JiraScripting_public/blob/main/create_jira_tickets/create_fancy_jira_issue.py that will do the job for you. Use the below code (from https://developer.atlassian.com/cloud/jira/platform/apis/document/playground/) and substitute "superDataFrame" with your dataframe, you might also have need of https://pypi.org/project/tabulate/, that could format the table nicely?

{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "This is my fancy description."
        }
      ]
    },
    {
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "I’m going to put my dataframe in here:"
        }
      ]
    },
    {
      "type": "codeBlock",
      "attrs": {
        "language": "python"
      },
      "content": [
        {
          "type": "text",
          "text": "superDataFrame"
        }
      ]
    }
  ]
}
Dren79
  • 89
  • 6