# Work item keys and smart links in Jira wiki and ADF

URL: https://goingstellar.ro/reference/jira-formatting/issue-links-smart-links/

A work item key written as [KEY-1] or as plain text is rendered as a link with the issue type icon and summary. ADF stores it as an inlineCard with the browse URL. The ADF card types inlineCard, blockCard and embedCard come back through v2 as plain links.

## Wiki markup

```
[WEB-1]
WEB-1
```

## Stored as ADF (REST API v3)

The ADF document Jira Cloud stores for `ADF:{"content": [{"content": [{"attrs": {"url": "https://example.com"}, "type": "inlineCard"}], "type": "paragraph"}], "type": "doc", "version": 1}`:

```json
{
 "type": "doc",
 "version": 1,
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "type": "inlineCard",
     "attrs": {
      "url": "https://example.com"
     }
    }
   ]
  }
 ]
}
```

## Examples

Wiki markup (API v2):

```
[WEB-1]
```

Link another work item by its key and get its icon and summary in the rendered text.

Rendered by Jira (HTML):

```html
<p>
    <span class="jira-issue-macro" data-jira-key="WEB-1" >
                <a href="https://your-site.atlassian.net/browse/WEB-1" class="jira-issue-macro-key issue-link"  title="Checkout redesign" >
            <img class="icon" src="https://your-site.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10307?size=medium" />
            WEB-1
        </a>
                                                    <span class="aui-lozenge aui-lozenge-subtle aui-lozenge-complete jira-macro-single-issue-export-pdf">To Do</span>
            </span>
</p>
```

Back to wiki after the round trip:

```
[WEB-1]
```

Sent to Jira Cloud on 29 Nov 2026.

Wiki markup (API v2):

```
WEB-1 mentioned in text
```

Type the key inside a sentence with no brackets.

Rendered by Jira (HTML):

```html
<p>
    <span class="jira-issue-macro" data-jira-key="WEB-1" >
                <a href="https://your-site.atlassian.net/browse/WEB-1" class="jira-issue-macro-key issue-link"  title="Checkout redesign" >
            <img class="icon" src="https://your-site.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10307?size=medium" />
            WEB-1
        </a>
                                                    <span class="aui-lozenge aui-lozenge-subtle aui-lozenge-complete jira-macro-single-issue-export-pdf">To Do</span>
            </span>
 mentioned in text</p>
```

Back to wiki after the round trip:

```
[WEB-1] mentioned in text
```

Sent to Jira Cloud on 29 Nov 2026.

Wiki markup (API v2):

```
{jira:WEB-1}
```

Try the macro form of a work item link.

Rendered by Jira (HTML):

```html
{jira:WEB-1}
```

Back to wiki after the round trip:

```
{jira:WEB-1}
```

Sent to Jira Cloud on 29 Nov 2026.

Wiki markup (API v2):

```
[smart-link|https://example.com|smart-link]
```

Write a link with an alias and a title in wiki and see what ADF stores.

Rendered by Jira (HTML):

```html
<p><a href="https://example.com" title="smart-link" class="external-link" rel="nofollow noreferrer">smart-link</a></p>
```

Back to wiki after the round trip:

```
[https://example.com|https://example.com|smart-link]
```

Sent to Jira Cloud on 29 Nov 2026.

ADF (API v3):

```
{"content": [{"content": [{"attrs": {"url": "https://example.com"}, "type": "inlineCard"}], "type": "paragraph"}], "type": "doc", "version": 1}
```

Create an inline smart link card from ADF.

Rendered by Jira (HTML):

```html
<p><a href="https://example.com" title="smart-link" class="external-link" rel="nofollow noreferrer">https://example.com</a></p>
```

Back to wiki after the round trip:

```
[https://example.com|https://example.com|smart-link]
```

Sent to Jira Cloud on 29 Nov 2026.

ADF (API v3):

```
{"content": [{"attrs": {"url": "https://example.com"}, "type": "blockCard"}], "type": "doc", "version": 1}
```

Create a block smart link card from ADF.

Rendered by Jira (HTML):

```html
<p><a href="https://example.com" title="smart-card" class="external-link" rel="nofollow noreferrer">https://example.com</a></p>
```

Back to wiki after the round trip:

```
[https://example.com|https://example.com|smart-card]
```

Sent to Jira Cloud on 29 Nov 2026.

ADF (API v3):

```
{"content": [{"attrs": {"layout": "center", "url": "https://example.com"}, "type": "embedCard"}], "type": "doc", "version": 1}
```

Create an embedded card from ADF.

Rendered by Jira (HTML):

```html
<p><a href="https://example.com" title="smart-embed" class="external-link" rel="nofollow noreferrer">https://example.com</a></p>
```

Back to wiki after the round trip:

```
[https://example.com|https://example.com|smart-embed]
```

Sent to Jira Cloud on 29 Nov 2026.

## What changes in conversion

- A key in brackets or in plain text is stored as an inlineCard whose url is the browse address of the work item. The wiki read adds the brackets back, so `WEB-1 mentioned in text` comes back as `[WEB-1] mentioned in text`.
- A link written as [alias|url|title] is stored as an inlineCard with only the url. The alias is lost and the wiki read repeats the url as alias.
- inlineCard, blockCard and embedCard all come back through v2 as [url|url|title] with the title smart-link, smart-card or smart-embed.
- The macro form {jira:WEB-1} is not interpreted: it is stored as text and rendered with the braces.

## Pitfalls

- A key only becomes a card if the work item exists and the writer can see it. The probes used a key that exists on the site.
- The card type (inline, block, embed) is lost in a v2 read. Use v3 when the layout of the card matters.
- The alias in `[alias|url]` is not kept when Jira turns the link into a smart link card.

## Related

- [[alias|url] external links](https://goingstellar.ro/reference/jira-formatting/external-links/)
- [[~accountid:] mentions](https://goingstellar.ro/reference/jira-formatting/user-mentions/)
- [[pagetitle] and [space:page] links](https://goingstellar.ro/reference/jira-formatting/confluence-page-links/)
- [REST API v2 wiki markup vs v3 ADF](https://goingstellar.ro/reference/jira-formatting/api-v2-vs-v3/)

## Sources

- [Atlassian Document Format: document structure (Jira Cloud platform)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)
- [Jira Cloud REST API v2: issue comments](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-comments/)
- [Jira Cloud REST API v3: issue comments](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/)

