Home/Jira formatting reference
Jira text formatting
Decisions in Jira: ADF decisionList and wiki output
A decision is a list item in the new editor that records what was decided. ADF stores it as a decisionList with decisionItem children and the state DECIDED. Wiki markup has no decision, and v2 returns a bullet with a <> prefix.
Wiki markup
There is no wiki markup for this element.
Stored as ADF (REST API v3)
The ADF document Jira Cloud stores for ADF:{"content": [{"attrs": {"localId": "d1"}, "content": [{"attrs": {"localId": "d2", "state": "DECIDED"}, "content": [{"text": "Ship on Friday", "type": "text"}], "type": "decisionItem"}], "type": "decisionList"}], "type": "doc", "version": 1}:
{
"type": "doc",
"version": 1,
"content": [
{
"type": "decisionList",
"content": [
{
"type": "decisionItem",
"content": [
{
"type": "text",
"text": "Ship on Friday"
}
],
"attrs": {
"state": "DECIDED"
}
}
],
"attrs": {}
}
]
}
Examples
ADF (API v3)
{"content": [{"attrs": {"localId": "d1"}, "content": [{"attrs": {"localId": "d2", "state": "DECIDED"}, "content": [{"text": "Ship on Friday", "type": "text"}], "type": "decisionItem"}], "type": "decisionList"}], "type": "doc", "version": 1}Record a decision as structured content in a comment sent through the v3 API.
Rendered by Jira (HTML)
<ul>
<li><> Ship on Friday</li>
</ul>
Back to wiki after the round trip
* <> Ship on FridaySent to Jira Cloud on .
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}Compare with an action item: a taskList has open and done states, a decisionList has one.
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)
* [ ] taskCheck that typing a checkbox in wiki does not create either node.
Rendered by Jira (HTML)
<ul>
<li>[ ] task</li>
</ul>
Back to wiki after the round trip
* [ ] taskSent to Jira Cloud on .
What changes in conversion
- ADF to wiki turns the decisionItem into a bullet whose text starts with
<>. The list type is lost. - The html from v2 shows the same bullet with the literal characters <> before the text, so the decision looks like an ordinary list item there.
- The localId values sent with the decisionList and the decisionItem were not in the stored ADF.
Pitfalls
- Wiki markup cannot create a decision. Write it through the v3 API or the editor.
- Anything that reads decisions through v2 sees a bullet with
<>and has to look at ADF to tell it apart from an ordinary item.