How to set JIRA report category

Written on April 16, 2017

Reports in JIRA are grouped into four categories, when displayed on reports page. You can choose one of them, but at the time of writing this (JIRA 7.4), you cannot create your own category.

These instructions have been tested in JIRA 7.2.2.

Setting category

Report category is specified in the atlassian-plugin.xml, inside the report’s tag, using the category tag with a key attribute.

For example:

  <report name="Test Report" i18n-name-key="test-report.name" key="test-report" class="com.example.jira.testreport.TestReport">
    <description key="test-report.description">The Test Report Plugin</description>
    <resource name="view" type="velocity" location="/templates/reports/test-report/view.vm"/>
    <resource name="i18n" type="i18n" location="TestReport"/>
    <label key="test-report.label"></label>
    <category key="issue.analysis" />  <!-- setting category -->
  </report>

Available categories

The possible values of the key attribute are:

Key value Category
agile Agile
issue.analysis Issue analysis
forecast.management Forecast & management
other Other

If you don’t specify a category key, the other is used as default.

If you use unsupported value, the plugin will fail to load with the following error being logged: The report module: com.test.report-injection-test:my-report-x specified a category key that is not a valid category: x. I used category key="x" in this case.


Comments