Home/Jira formatting reference
Jira text formatting
Task lists (action items) in Jira: wiki, Markdown, ADF
An action item is a checkbox line in the new editor. It is stored as an ADF taskList with taskItem children in the state TODO or DONE. Wiki markup has no checkbox, so the REST API v2 writes tasks as plain bullets.
Wiki markup
There is no wiki markup for this element.
Markdown shortcuts in the editor
Per the Atlassian documentation, not tested.
| Type | What happens |
|---|---|
[] | Press the Space key after [] to create an action item, per the Atlassian documentation. Tab indents and Shift + Tab outdents. |
Stored as ADF (REST API v3)
The ADF document Jira Cloud stores for ADF:{"content": [{"attrs": {"localId": "t1"}, "content": [{"attrs": {"localId": "t2", "state": "TODO"}, "content": [{"text": "Write tests", "type": "text"}], "type": "taskItem"}, {"attrs": {"localId": "t3", "state": "DONE"}, "content": [{"text": "Review", "type": "text"}], "type": "taskItem"}], "type": "taskList"}], "type": "doc", "version": 1}:
{
"type": "doc",
"version": 1,
"content": [
{
"type": "taskList",
"content": [
{
"type": "taskItem",
"content": [
{
"type": "text",
"text": "Write tests"
}
],
"attrs": {
"state": "TODO"
}
},
{
"type": "taskItem",
"content": [
{
"type": "text",
"text": "Review"
}
],
"attrs": {
"state": "DONE"
}
}
],
"attrs": {}
}
]
}
Examples
ADF (API v3)
{"content": [{"attrs": {"localId": "t1"}, "content": [{"attrs": {"localId": "t2", "state": "TODO"}, "content": [{"text": "Write tests", "type": "text"}], "type": "taskItem"}, {"attrs": {"localId": "t3", "state": "DONE"}, "content": [{"text": "Review", "type": "text"}], "type": "taskItem"}], "type": "taskList"}], "type": "doc", "version": 1}Create two action items, one open and one done, through the v3 API.
Rendered by Jira (HTML)
<ul>
<li>Write tests</li>
<li><del>Review</del></li>
</ul>
Back to wiki after the round trip
* Write tests
* -Review-Sent to Jira Cloud on .
Wiki markup (API v2)
* [ ] taskType a checkbox in wiki markup the way it is written in Markdown.
Rendered by Jira (HTML)
<ul>
<li>[ ] task</li>
</ul>
Back to wiki after the round trip
* [ ] taskSent to Jira Cloud on .
Wiki markup (API v2)
- [x] doneType a checked box with a dash list.
Rendered by Jira (HTML)
<ul class="alternate" type="square">
<li><span class="error">[x]</span> done</li>
</ul>
Back to wiki after the round trip
* [x] doneSent to Jira Cloud on .
What changes in conversion
- ADF to wiki loses the state in the markup. The open item comes back as a plain bullet and the done item as a bullet in strikethrough:
* -Review-. - The localId values sent with the taskList and the taskItems were not in the stored ADF; the stored attrs carry only the state.
- Wiki to ADF never creates a task.
* [ ] taskis stored as a bullet whose text is the characters [ ] task.
Pitfalls
- Do not rely on a wiki round trip for action items. A task list that is read through v2 and written back loses its checkboxes.
- [x] doneas wiki puts the [x] through the link parser, and the rendered HTML shows it as an error span.