Context Item Types
A context item can be a JIRA entities such as JIRA issues, projects, groups, users or text and numbers. For now, it only supports JIRA issue with most of its properties. The proper expression for contexts is [[name]]
where "name" is the name of the context property, field or custom field. Example is [[assignee]], [[key]], [[summary]]
and [[custom field name]]
.
Context-items are evaluated and ultimately result in a text, boolean and number.
The following are the supported JIRA issue properties:
affectedversions : Version names
assignee : Display name
attachments : Attachment name
comments : Comments
components : Component names
created : Create date
creator : Display name
description : Description
duedate : Due date
environment : Environment name
estimate : Estimate
fixversions : Version names
ischildissue : Boolean whether it is a child requirement issue
issuetype : Issue type name
key : Key
labels : Labels
linkedissues : Issue keys
parent : Parent issue key when sub-task
parentissuekey : Issue key of parent issue in a parent/child relation
path : Requirements path
priority : Priority name
project : Project key
resolution : Resolution
reporter : Display name
securitylevelid : Number context-item
status : Status
subtasks : Sub tasks issue keys
summary : Summary
updated : Update date
url : Absolute URL to this JIRA issue
votes : Votes
watches : Watchers
name of custom field : Custom field value
e.g. export of R4J issue revision number
Expressions
An expression is a stand-alone text fragment of the form [[$expression]]
where "name" is the name of the expression. The expression text fragment will be substituted during the generation with the evaluation value of the expression.
[[$requirementsPathSplitted]]
This expression provides an auto-filter functionality for the different folder paths.
If this variable is used, columns will be added automatically so that every folder level is in a separate column. e.g. If the path is "REQ\System\Component", 3 columns will be created with the content REQ, System, and Component respectively.
[[$header]]
This expression is used with [[$requirementsPathSplitted]]
and determines the starting location for its headers. See this sample template for usage.
The column headers for [[$requirementsPathSplitted]]
will always have the 1st column with a "Project" text header with all succeeding columns with the headers "Level 1" to "Level n".
Column Headers
Column headers for the Excel template may be any text or JIRA issue fields. Results of the field sets are exported below its corresponding column.
Template Administration
Read here.
Export Generation
Once you have uploaded a template, you can use it to generate exports in Excel file format. During the export, the texts in the template are evaluated according to the template language.
An Excel file is generated with the expressions replaced with the actual data and then downloaded. The set of issues used depends on whatever issue/s are selected in the project tree.
Generate a new export
via Project Tree View
Switch to the tree view of the project you want to generate a new export on:
either click on Requirements in the main navigation bar and select a project from Current Project or Recent Projects
or select Requirements > View all projects from the main navigation bar and select a project from the list.
Select an item from the project tree.
The information available to the template used for the export depends on the project tree selection.Click on the Export button located in the top right corner and select Export Template... to open the export dialog.
Select the template you want to use for generating the export.
Click on Select to start the export and download the generated Excel file.
Info |
---|
When an error occurs during export, the generated export file will contain the error logs. |
Sample Excel Template Files
Issue Export
Shows basic excel template usage.
View file | ||
---|---|---|
|
Issue Export with [[requirementsPathSplitted]]
expression
Shows usage for [[requirementsPathSplitted]]
and header expressions.
View file | ||
---|---|---|
|
Issue Export with [[requirementsPathSplitted]]
expression and auto-filters for columns
Shows usage for [[requirementsPathSplitted]]
and header expressions with use of auto-filter in excel.
View file | ||
---|---|---|
|
Constraints
Currently only supports single sheet template
Other JIRA entities not yet supported
Tree Folders not yet supported
Statements not yet supported
JQL or datasets not supported
Excel template file format
The template file can contain any Excel content as well as certain placeholders. The exported file is identical to the template, except that the placeholders are replaced with the values of fields in the Jira issue result set. When the export process encounters a row containing expressions of the form [[
name]]
in one or more columns, where “name” is the name of a Jiraissue field, it replaces that row with the values of the named fields of the first issue in the result set. It then inserts new rows after this row, one row for each of the remaining issues in the result set.
Examples of templates
Typically, a template file contains a header row with names for each of the Jira issue fields to be exported in columns. The next row contains placeholders for those fields in corresponding columns. Above and below these two rows the template can contain anything. For example, it could contain an explanation of the information being presented in the file.
Here is a simple example of an Excel template (basic_template.xlsx):
Requirement ID | Status | Summary |
[[key]] | [[status]] | [[summary]] |
If there are three issues in the result set, the exported file contains four rows, the first as seen above, and three after that for the issues with columns containing the values of the fields key, status and summary.
More than one placeholder may appear in a column and literal text can be included for purposes such as formatting. In the following example, instead of having the key and summary appear in different columns, as above, we put the values into a column together, separated by a colon and space:
Requirement | Status |
[[key]]: [[summary]] | [[status]] |
Additionally, the special placeholders [[$header]]
and [[$requirementsPathSplitted]]
may be used. The first appears in the header row and the second appears in the same column of the next row. Here is an example of such a template (template_requirementspathsplitted.xlsx):
Requirement ID | Status | Summary | [[$header]] |
[[key]] | [[status]] | [[summary]] | [[$requirementsPathSplitted]] |
When the export process encounters rows containing these expressions it splits the folder path into its elements and inserts columns for each element. The header for the first element of the path is the name of the project, and the headers of the remaining elements are “Level 1”, “Level 2” and so on. The following rows contains the values of the elements of the path for each issue in the corresponding column.
Placeholders
The following fields may appear as placeholders. In addition, all custom fields may be used.
A custom field can be referred to either by its name (e.g. Classification) or by its internal Jira ID in the format customfield_<ID>
(e.g. customfield_10221).
Property | Value |
---|---|
affectedversions | version names (comma delimited) |
assignee | display name |
attachments | attachment names (comma delimited) |
comments | text of comments (comma delimited) |
components | component names (comma delimited) |
created | creation date |
creator | display name |
description | description |
duedate | due date |
environment | environment name |
estimate | estimate |
fixversions | version names (comma delimited) |
ischildissue | “true” if child issue, “false” otherwise |
issuetype | issue type name |
key | issue key |
labels | labels (comma delimited) |
linkedissues | issue keys (comma delimited) |
parent | parent issue key if issue is a subtask, otherwise no value |
path | the path of the issue in the project tree |
priority | priority display name |
project | project key |
resolution | resolution |
reporter | display name |
securitylevelid | number |
status | status name |
subtasks | subtasks issue keys (comma delimited) |
summary | summary |
updated | update date |
url | absolute URL of the issue |
votes | number of votes |
watchers | display names (comma delimited) |
Limitations
Only single sheet Excel templates are supported.
Exporting attachments is not supported.
Export is only available from the R4J Tree View, not from the standard Jira search results in the issue navigator. (This means you cannot determine the exported result set using JQL or saved queries.)