"jiraCreatedVsResolvedChart" Macro

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

Reference

Description

Displays a line chart comparing how many JIRA issues were created and how many were resolved over a period of time, using the statistics JIRA computes itself. The issues are selected by a JQL query or by the id of a filter saved in JIRA.

The Macro always starts a new block: it cannot be used inline.

Usage

The Macro has no content: everything is passed as parameters. Either id or url must be set to designate the JIRA instance, and either query or filterId to designate the issues. period and daysPreviously are always mandatory. The charted period always ends at the moment the page is displayed and extends daysPreviously days into the past, split into intervals of the size given by period.

{{jiraCreatedVsResolvedChart id="..." url="..." period="..." daysPreviously="..." query="..." filterId="..." count="..." displayTrend="..."/}}

Parameters

NameMandatoryAllowed ValuesDefault ValueDescription
periodYesHOURLY, DAILY, WEEKLY, MONTHLY, QUARTERLY, YEARLYN/AThe size of the interval each point of the chart covers.
daysPreviouslyYesA positive numberN/AHow many days into the past the chart extends, counted back from the moment the page is displayed.
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.
queryquery or filterIdA JQL queryN/AThe query selecting the issues to chart. Ignored when filterId is set.
filterIdquery or filterIdThe id of a filter saved in JIRA, with or without the filter- prefixN/AThe saved JIRA filter selecting the issues to chart. Takes precedence over query.
countNotrue, falsetrueWhether each interval is counted on its own. Set it to false to accumulate the values from one interval to the next instead.
displayTrendNotrue, falsefalseWhether a trend curve is added to the chart.
displayVersionNoNONE, ONLY_MAJOR, ALLNONEThe versions to mark on the chart. Not implemented yet: the version data is fetched from JIRA but never displayed, and ONLY_MAJOR and ALL currently behave identically.

Examples

Charting the last thirty days, day by day

{{jiraCreatedVsResolvedChart daysPreviously="30" period="DAILY" url="https://jira.xwiki.org" query="project=XWIKI"/}}

jira-createdvsresolved-daily.png

Charting a longer period with a trend curve

{{jiraCreatedVsResolvedChart daysPreviously="500" period="MONTHLY" url="https://jira.xwiki.org" query="project=XWIKI" displayTrend="true"/}}

jira-createdvsresolved-trend.png

Setting the parameters in the WYSIWYG editor

jira-createdvsresolved-macro.png

FAQ

Why does the chart end at today?

Because daysPreviously counts backwards from the moment the page is displayed; the chart has no future part.

Why does the curve only ever go up?

Because count is off, which accumulates the values instead of counting each period on its own. Set count to true to get one value per period.

Why do no versions appear when I set displayVersion?

Because the parameter is not implemented yet: the version data is fetched from JIRA and then not displayed.

Related

Get Connected