Fetch Commands for JIRA

The article details how to run fetch commands to query data from Atlassian Jira. This data can then be used to build Elements/Datasets in Metric Insights.

1. Determine the fields to be fetched from Jira

You can find a list of available fields:

  1. In List View
  2. In Detail View
  3. When adding a new Issue
1.1. OPTION 1: Access the List View
  1. Click the Views icon (3 vertical lines) to switch to the List View
  2. Open the Columns dropdown for a list of available fields
1.2. OPTION 2: Access the Detail View
  1. Click the Views icon (3 vertical lines)
  2. Select Detail View
  3. Choose the required fields
1.3. OPTION 3: Create Issue > Configure fields
  1. Click [Create issue] to open the new issue pop-up
  2. Open the Configure fields dropdown to see the list of available fields

2. Use MIQL to fetch data from Jira (5.3.+)

The process below exemplifies how an MIQL command is used to fetch data into a Metric Insights Dataset. Creating an Element (Metric or Report) with data sourced from Jira should use the same workflow.

  1. MIQL (Metric Insights Query Language) is a simple query language designed for fetching and processing data. 
  2. Learn more from MIQL Syntax Guide for Plugins

2.1. Dataset Editor > Data tab

In the Dataset Editor:

  1. Specify Atlassian JIRA as Data Source
  2. Choose the Data Collection Trigger
  3. In the Jira Report field, select ONE or All Projects from which the data will be collected
  4. Formulate your Plugin command using MIQL
  5. [Validate]

2.2. Preview the Data

  1. The fields specified in the Query are displayed in the Validation Rows Preview
  2. [Save] to see the Dataset Columns List

2.3. View and manage the Dataset Columns List

Manipulate the display of Dataset Columns as required.

  • To activate automated data collection and to be able to access Dataset Viewer, click [Enable and View] Dataset.
3. Use JQL commands to fetch data from Jira (prior to 5.3)

To build a fetch command in Version prior to 5.3, follow this syntax:

  1. Formulate your query in braces {}.
  2. The Query typically consists of 2 internal parameters - "jql" and "fields" (both must be followed by a colon (:), entered in quotation marks and separated with a comma).

SAMPLE QUERY: {"jql":"query_copied_from_jira","fields":"field_name", "field_name", "field_name"}

3.1. Dataset Editor > Data tab

In the Dataset Editor:

  1. Specify Atlassian JIRA as Data Source
  2. Choose the Data Collection Trigger
  3. In the Project field, select ONE or All Projects from which the data will be collected
  4. Formulate your Query
  5. [Validate]

3.2. Preview the Data

  1. The fields specified in the Query are displayed in the Validation Rows Preview
  2. [Save] to see the Dataset Columns List

3.3. View and manage the Dataset Columns List

Manipulate the display of Dataset Columns as required.

  • To activate automated data collection and to be able to access Dataset Viewer, click [Enable and Publish] Dataset.