portfolio-projects-case-studies · Jira

How I Write Jira Tickets Without Rebuilding the Formatting

How I reuse a Jira Cloud template with AI and Atlassian Document Format, from the API request to reviewing the pasted ticket.

NEXT NOTEJira Tools: copy tickets with context and open them by IDA JSON block branches into document nodes and becomes a ticket with checkboxes.

I started using ChatGPT to draft user stories, document bugs, and organize acceptance criteria. Sometimes the text was ready for review, but moving it into Jira meant rebuilding colored panels, turning lists back into checkboxes, and recreating the occasional table. That last handoff was where I lost the structure of the team’s template.

Markdown worked for headings, bold text, links, and lists. Jira Cloud supports pasting Markdown, but a checklist can come through as a text list, and Jira panels need their own structure. When I copy from a rendered page, the browser can put HTML on the clipboard. That helps with common formatting, including some tables, depending on what the source app copies and how the destination editor interprets it. Pasting as plain text uses the clipboard’s text version. Markdown and keyboard shortcuts in Jira Cloud.

A Jira description has its own structure

To understand what I was losing, I looked at how Jira represents a description. That led me to Atlassian Document Format (ADF), a JSON format that describes rich text as a tree. Each block has a type, can have attributes, and can contain other nodes. This example panel opens a story about downloading an invoice. ADF document structure.

{
  "type": "panel",
  "attrs": { "panelType": "info" },
  "content": [
    {
      "type": "paragraph",
      "content": [{ "type": "text", "text": "Download an invoice as a PDF" }]
    }
  ]
}

type identifies the node as a panel, attrs.panelType sets its variant, and content holds the paragraph and its text. In a complete document, this block sits inside the content of the root doc node, with version: 1. ADF panel node.

How I get a template from Jira Cloud

I start with a test issue I’m allowed to read and whose description already has the structure I want. In this example, DEMO-123 has an info panel, an acceptance checklist, and a paragraph for open questions. The Jira REST API v3 Get issue operation accepts an issue ID or key. I request only description and extract fields.description from the response. Get issue in Jira REST API v3.

curl --fail --silent --show-error \
  --user "$JIRA_EMAIL" \
  --header 'Accept: application/json' \
  'https://your-site.atlassian.net/rest/api/3/issue/DEMO-123?fields=description' \
  | jq -e '.fields.description | select(.type == "doc" and .version == 1)' \
  > template.adf.json

The domain and issue key are fictional. The example uses HTTP Basic authentication with JIRA_EMAIL already set and an API token without scopes, which you enter when curl prompts for a password. For a scoped token, use https://api.atlassian.com/ex/jira/{cloudId} as the base URL and include the scopes required by the operation. The account needs Browse projects and permission to view the issue if issue-level security applies. If the description is empty, the filter returns no template. If you’re starting without a reference issue, you can use the complete document below as a template and replace its text with placeholders. Before giving the ADF to the AI, I replace internal text and identifiers with fictional values. Basic authentication · API tokens and scopes.

The prompt I use to fill in the template

Here’s the fictional requirement. A signed-in user can download an invoice from their account as a PDF from their billing history. If the PDF isn’t available yet, the user sees a message and the download doesn’t start. What happens if their session expires just as they click Download is still open.

Write a Jira issue description in English using the ADF template
and requirement at the end of this message.

Preserve the order of the sections, node types, nesting, and relevant
attributes, including panelType. Use unique localId values for the
task list and its items. Leave unverified criteria in the TODO state.

Replace the sample text with content grounded in the requirement.
Write observable acceptance criteria. If information is missing,
add a question to the open questions section. Omit unconfirmed
business rules, dependencies, and states.

Return one valid ADF v1 JSON object with type "doc", version 1,
and content. Omit the Markdown code fence.

ADF template
[paste the contents of template.adf.json here]

Requirement
A signed-in user can download an invoice from their own account
as a PDF from billing history. If the PDF is not yet available,
show a message and do not start a download. What happens if the
session expires when the user clicks Download is still open.

Here’s a shortened example output you can import as a complete document. The panel from earlier stays at the top, and the acceptance criteria keep their checkboxes.

{
  "type": "doc",
  "version": 1,
  "content": [
    {
      "type": "panel",
      "attrs": { "panelType": "info" },
      "content": [{
        "type": "paragraph",
        "content": [{ "type": "text", "text": "Download an invoice as a PDF" }]
      }]
    },
    {
      "type": "taskList",
      "attrs": { "localId": "invoice-checks" },
      "content": [
        {
          "type": "taskItem",
          "attrs": { "localId": "invoice-ready", "state": "TODO" },
          "content": [{ "type": "text", "text": "When signed in and the PDF is available, choosing to download an invoice from your own account in billing history starts the PDF download." }]
        },
        {
          "type": "taskItem",
          "attrs": { "localId": "invoice-pending", "state": "TODO" },
          "content": [{ "type": "text", "text": "If the PDF is not yet available, a message appears and the download does not start." }]
        }
      ]
    },
    {
      "type": "paragraph",
      "content": [{ "type": "text", "text": "Open question: what happens if the session expires when the user clicks Download?" }]
    }
  ]
}

How I bring it into Jira

Up to this point, I can work with a REST client, jq, and my usual JSON editor. I built Jira ADF Editor so I could review the rich-text document and get it into Jira’s editor. It’s a standalone web app that processes the JSON in the browser. I fetch the reference issue separately and save the result in Jira. Jira ADF Editor.

  1. Paste the output into JSON ADF or load a file with Abrir JSON (Open JSON). The editor can also extract the description from the original REST response.
  2. Check the validation messages and Vista previa (Preview). Look for the info panel, the two unchecked boxes, and the open question.
  3. Click Copiar para Jira (Copy for Jira) and paste with ⌘V or Ctrl+V in a test issue’s description. Check the pasted result, save in Jira, and reopen the issue.

For pasting, the app turns the ADF into ProseMirror nodes using Atlassian’s published schema and serializes those nodes to HTML. The HTML carries attributes such as data-panel-type for the panel variant and data-task-state for each checkbox’s state. The app also writes a text version to the clipboard. If it detects changes when it reads the HTML back locally, it warns me before copying.

The local tests pasted HTML into ProseMirror using that schema and checked that a panel and the checkboxes’ TODO and DONE states survived reopening the document there. The browser and the Jira instance’s editor plugins affect the actual paste. That’s why I check the result after saving and reopening the issue in that instance.

What I share with the team and what we review

I’d share a reference ADF document with space for context, acceptance criteria, and questions. Individual tickets can add scenarios or a table when they need one. The app stores templates in the browser, and the template library can be exported and imported for sharing. JSON preserves the ADF document. Markdown gives me a readable version to share, and the app flags formatting changes on export.

  • Product and business confirm which invoices are in scope and who can download them.
  • Functional analysis defines what it means for a PDF to be unavailable and specifies the rule for an expired session.
  • UX checks where Download appears and whether the message tells people what they can do next.
  • QA tests available and pending PDFs, access from a different account, and the session expiring just as the user clicks.
  • Engineering confirms which service delivers the PDF, how authorization is checked, and which states or errors the service returns.

I make three distinct checks. I validate the JSON and its ADF structure. I check the panel, boxes, and text in Jira after saving. And I review with the team whether the criteria cover the edge cases and the dependencies are confirmed. The invoice description can pass the first two checks while the expired-session behavior is still open. I want the template to keep that decision visible so we can resolve it before we call the ticket ready.

More from this topic

portfolio · projects · case · studiesWhat Is ADF? How to Create AI-Assisted Jira Tickets in Your Company’s Formatportfolio · projects · case · studiesJira Tools: copy tickets with context and open them by IDportfolio · projects · case · studiesSitemap Explorer: turn your website’s URLs into a visual map