Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Improved content

The Excel template based export enables the R4J user to upload custom Excel files containing text fragments in accordance with the template language which will be exported as real data.

The template language consists of texts that will allow you to iterate over a set of issues in your Excel document with ease.

Template Language

The template language elements in the Excel Template are declared through an opening [[ marker and a closing ]] marker.

Currently, the template language only supports context items and expressions. users to export requirements into a custom Excel template. A template is an Excel file containing placeholders for fields in Jira issues. The export process iterates over a set of Jira issues and inserts rows with the values of the fields of the issues in Excel as indicated by the placeholders.

Export is available in the R4J Tree View. You first select a folder or issue, then in the R4J menu you select Export > Export Template. Finally you choose a template from the list of available templates. The Excel file is generated and can then be saved locally. The generated file contains a log of any errors.

Excel templates can only be uploaded to Jira by an R4J administrator - see Configuring Custom Export Templates.

On this page:

Table of Contents

Context Item Types

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

  1. Switch to the tree view of the project you want to generate a new export on:

    1. either click on Requirements in the main navigation bar and select a project from Current Project or Recent Projects

    2. or select Requirements > View all projects from the main navigation bar and select a project from the list.

  2. Select an item from the project tree.
    The information available to the template used for the export depends on the project tree selection. 

  3. Click on the Export button located in the top right corner and select Export Template... to open the export dialog.

  4. Select the template you want to use for generating the export.

  5. 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
nameattachments/222953473/222986259/1

Issue Export with [[requirementsPathSplitted]] expression

Shows usage for [[requirementsPathSplitted]] and header expressions.

View file
nameattachments/222953473/222855192/1

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
nameattachments/222953473/222789635/1

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

  • Attachment export 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.)