Going Stellar

Home/Jira formatting reference

Jira text formatting

Numbered lists in Jira: wiki markup, Markdown and ADF

A numbered list in wiki markup uses # at the start of each line, and ##, ### and so on for deeper levels. Jira Cloud stores it as an ADF orderedList with an order attribute that wiki cannot express.

Wiki markup

# item
## deeper item

Markdown shortcuts in the editor

Per the Atlassian documentation, not tested.

TypeWhat happens
1. textStarts an ordered list in the editor, per the Atlassian documentation. Use Tab to indent and Shift + Tab to outdent.
2) textAlso starts an ordered list in the editor, per the Atlassian documentation.

Stored as ADF (REST API v3)

The ADF document Jira Cloud stores for # a # numbered # list:

{
 "type": "doc",
 "version": 1,
 "content": [
  {
   "type": "orderedList",
   "attrs": {
    "order": 1
   },
   "content": [
    {
     "type": "listItem",
     "content": [
      {
       "type": "paragraph",
       "content": [
        {
         "type": "text",
         "text": "a"
        }
       ]
      }
     ]
    },
    {
     "type": "listItem",
     "content": [
      {
       "type": "paragraph",
       "content": [
        {
         "type": "text",
         "text": "numbered"
        }
       ]
      }
     ]
    },
    {
     "type": "listItem",
     "content": [
      {
       "type": "paragraph",
       "content": [
        {
         "type": "text",
         "text": "list"
        }
       ]
      }
     ]
    }
   ]
  }
 ]
}

Examples

Wiki markup (API v2)

# a
# numbered
# list

Write a simple numbered list. Jira numbers the items itself.

Rendered by Jira (HTML)

<ol>
	<li>a</li>
	<li>numbered</li>
	<li>list</li>
</ol>

Back to wiki after the round trip

# a
# numbered
# list

Sent to Jira Cloud on .

Wiki markup (API v2)

# one
## two
### three
#### four

Nest four levels deep with one more # per level.

Rendered by Jira (HTML)

<ol>
	<li>one
	<ol>
		<li>two
		<ol>
			<li>three
			<ol>
				<li>four</li>
			</ol>
			</li>
		</ol>
		</li>
	</ol>
	</li>
</ol>

Back to wiki after the round trip

# one
## two
### three
#### four

Sent to Jira Cloud on .

ADF (API v3)

{"content": [{"attrs": {"order": 3}, "content": [{"content": [{"content": [{"text": "starts at three", "type": "text"}], "type": "paragraph"}], "type": "listItem"}], "type": "orderedList"}], "type": "doc", "version": 1}

Start a list at 3 from the ADF side, for example to continue a list that was split by other content.

Rendered by Jira (HTML)

<ol>
	<li>starts at three</li>
</ol>

Back to wiki after the round trip

# starts at three

Sent to Jira Cloud on .

Wiki markup (API v2)

1. markdown one
2. markdown two

Paste a Markdown numbered list through the API.

Rendered by Jira (HTML)

<p>1. markdown one<br/>
2. markdown two</p>

Back to wiki after the round trip

1. markdown one
2. markdown two

Sent to Jira Cloud on .

What changes in conversion

  • A # list and its nested levels survive wiki, then ADF, then wiki without changes.
  • The ADF order attribute (start number) has no wiki form. A list stored with order 3 is written back through v2 as a plain # item and renders from 1.
  • Lines such as 1. text sent through the API are not converted. Jira stores them as paragraph text with a hardBreak between the lines. The conversion only happens when someone types in the editor, per the documentation.

Pitfalls

  • A Markdown-style 1. line sent as wiki text is not a list. Use # in wiki, or type the Markdown in the editor.
  • Wiki markup cannot set the start number. Only ADF carries it, and v2 drops it.
  • A # at the start of a line is a list item, not a heading, in wiki markup. Headings use h1. to h6..

Sources

  1. Text Formatting Notation Help (Jira, in-product help)
  2. Markdown and keyboard shortcuts (Atlassian Support, Jira Cloud)
  3. Atlassian Document Format: document structure (Jira Cloud platform)

Markdown version · All formatting pages