"jira" Macro

Last modified by Vincent Massol on 2026/08/04 21:49

Reference

Description

Fetches issues from a JIRA instance and displays them as a table, a bulleted list or an enumeration. The issues are either listed explicitly by their key in the Macro content, or selected by a JQL query.

Only the enum style can be used inline, inside a sentence; table and list always start a new block. How and when the issues are fetched is described in JIRA for users.

Usage

The Macro content holds either one issue key per line, when source is list, or a JQL query, when source is jql. With the list source a key may be followed by a pipe character and a free-text note, which the note field displays.

{{jira id="..." url="..." source="..." style="..." fields="..." parameters="..." maxCount="..."}}
...the JIRA issues to retrieve...
{{/jira}}

Either id or url must be set; id is recommended, for the reasons given in JIRA administration.

Parameters

NameMandatoryAllowed ValuesDefault ValueDescription
idid or urlAn instance id defined in the wiki administrationN/AThe JIRA instance to query. Recommended over url, because the URL is then defined in a single place and the instance can authenticate.
urlid or urlA JIRA instance URLN/AThe JIRA instance to query, given directly by its URL. Takes precedence over id when both are set.
sourceNolist, jqllistHow the Macro content designates the issues. With list the content holds one issue key per line; with jql it holds a JQL query.
styleNotable, list, enumtableHow the issues are rendered. Only enum can be used inline, inside a sentence.
fieldsNoA comma-separated list of field definitionsDepends on styleThe issue fields to display, in display order. The defaults are type, key, summary, status, created for table, status, key, summary for list, and status, key for enum. See JIRA Issue Fields for the available ids, the field types, and the id:label!type syntax.
parametersNoA comma-separated list of name=value pairs, values optionally single-quotedN/AConfiguration passed to the data sources, displayers and field displayers, for example field.url.label='See the issue' to set the label of the links produced by the url field type. Separate several pairs with a comma; any other separator makes the whole value be read as a single pair.
maxCountNoA positive number, or -1-1The highest number of issues to display. With -1 the limit is the one JIRA applies.
fieldNamesNoA comma-separated list of labelsN/ADeprecated, and used only by the table style: overrides the column headers, positionally. Set the label part of each fields entry instead.

Examples

Listing issue keys, with the default table

{{jira url="https://jira.xwiki.org"}}
XWIKI-2484
XE-291
XWIKI-3677
{{/jira}}

jira-macro-default.png

Displaying a custom JIRA field under a chosen column header

{{jira url="https://jira.xwiki.org" source="jql" fields="type,key,status,'Flickering Test':'List of flickering tests'"}}
"Flickering Test" is not empty
{{/jira}}

jira-custom-field.png

Adding a note to each issue

{{jira url="https://jira.xwiki.org" fields="type:'Issue type', key:'Issue Id', summary:'Short Description', status:'Issue Status', assignee:'Person to Fix this', created:'Creation Date', note:'Notes'"}}
XWIKI-2484|Hard to fix
XE-291|Easy to fix
XWIKI-3677|This issue takes too long. Need to find a solution ASAP
{{/jira}}

jira-macro-table.png

Rendering the issues as a bulleted list

{{jira url="https://jira.xwiki.org" style="list"}}
XWIKI-2484
XE-291
XWIKI-3677
{{/jira}}

jira-macro-list.png

Rendering the issues as an enumeration

{{jira url="https://jira.xwiki.org" style="enum"}}
XWIKI-2484
XE-291
XWIKI-3677
{{/jira}}

jira-macro-enum.png

Selecting the issues with a JQL query

{{jira url="https://jira.xwiki.org" style="table" source="jql"}}
project = XWIKI AND resolution = Fixed AND fixVersion = "17.10.0" ORDER BY priority DESC
{{/jira}}

jira-macro-jql.png

Displaying the labels of each issue

{{jira url="https://jira.xwiki.org" fields="type,key,labels" source="jql"}}
project = XWIKI AND created > 2024-01-01 AND labels IS NOT EMPTY AND resolution = Unresolved ORDER BY priority DESC, updated DESC
{{/jira}}

jira-macro-labels.png

FAQ

Why is one column empty for some issues?

The field exists on those issues but has no value in JIRA, or the account the wiki uses to reach JIRA cannot read it. A field id that JIRA does not know at all produces an empty column for every issue.

Can I reuse the same issue list with a different presentation?

Not from a single Macro call: each call renders one style. Write a second jira Macro call with the same content and a different style.

Related

Get Connected