"jiraCreatedVsResolvedChart" Macro
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
| Name | Mandatory | Allowed Values | Default Value | Description |
|---|---|---|---|---|
| period | Yes | HOURLY, DAILY, WEEKLY, MONTHLY, QUARTERLY, YEARLY | N/A | The size of the interval each point of the chart covers. |
| daysPreviously | Yes | A positive number | N/A | How many days into the past the chart extends, counted back from the moment the page is displayed. |
| id | id or url | An instance id defined in the wiki administration | N/A | The JIRA instance to query. Recommended over url, because the URL is then defined in a single place and the instance can authenticate. |
| url | id or url | A JIRA instance URL | N/A | The JIRA instance to query, given directly by its URL. |
| query | query or filterId | A JQL query | N/A | The query selecting the issues to chart. Ignored when filterId is set. |
| filterId | query or filterId | The id of a filter saved in JIRA, with or without the filter- prefix | N/A | The saved JIRA filter selecting the issues to chart. Takes precedence over query. |
| count | No | true, false | true | Whether each interval is counted on its own. Set it to false to accumulate the values from one interval to the next instead. |
| displayTrend | No | true, false | false | Whether a trend curve is added to the chart. |
| displayVersion | No | NONE, ONLY_MAJOR, ALL | NONE | The 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"/}}
Charting a longer period with a trend curve
{{jiraCreatedVsResolvedChart daysPreviously="500" period="MONTHLY" url="https://jira.xwiki.org" query="project=XWIKI" displayTrend="true"/}}
Setting the parameters in the WYSIWYG editor

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.