How to Export Jira Issues with Component Versions to Google Sheets

How to Export Jira Issues with Component Versions to Google Sheets

Overview

If you need to export your Jira issues to an external file like CSV and include the Component Versions from Octo in one of the columns, Jira’s native export functionality can help. However, it has a significant limitation: it only allows exporting a maximum of 1,000 issues at a time.

The Google Sheets add-on for Jira can be a game-changer for exports involving more than 1,000 issues. This guide explains how to configure the export correctly, as the default settings will result in a [no field found] error for the Component Versions column.

Step-by-step guide

Step 1: Create a JQL Query in Jira

First, define the issues you want to export by creating a JQL query. For example:

project = ABC AND "Component Versions" IS NOT EMPTY

This query will filter for issues in project ABC where the Component Versions field is populated.

 

 

 

Step 2: Link Jira to Google Sheets

If you haven’t already connected Jira to Google Sheets, follow these steps:

  1. In Jira, go to Apps > Open in Google Sheets.

  2. Follow the on-screen instructions to establish the connection.

Note: If you’ve already set up the connection, you can skip this step and proceed to Step 4.


image-20241205-153313.png

 

 

Step 3: Addressing the '[no field found]' Error

When you open the generated sheet after using the ‘Open in Google Sheets’ export, you might notice the Component Versions column shows a '[no field found]' error instead of actual data. This is expected due to Jira Cloud for Sheets cannot parse Jira columns of type list by default.

You can close this spreadsheet, as it won’t be useful for our purpose.

 

 

 

Step 4: Create a New Spreadsheet with the Correct Configuration

  1. Open a new Google Sheet.

  2. Go to Extensions > Jira Cloud for Sheets > Open.

  3. Click Get issues from Jira.

  4. Change the Import Type to =Jira() and enable the Jira function.

image-20241205-154037.png



 

 

Step 5: Use the =Jira() Function

To fetch your issues with the correct fields, follow these steps:

  1. In cell A1 of the new spreadsheet, enter the following formula:

    =Jira("<your JQL>", "<fields you want to include>", <range of issues>)

    Example:

    =Jira("project = lotsofissues", "key, summary, Component Versions.value", 0, 20000)
  2. Adjust the parameters as follows:

    • Replace <your JQL> with your Jira query.

    • Replace <fields you want to include> with the columns you need, ensuring you use Component Versions.value (more details below).

    • Specify the range of issues to retrieve (e.g., 0, 20000).

image-20241205-154254.png

Important Notes

  1. Use Component Versions.value:

    • This is crucial to avoid the '[no field found]' error. Using Component Versions instead of Component Versions.value will result in errors.

  2. Issue Limitations:

    • According to Atlassian’s official documentation, the =Jira() function supports up to 10,000 issues. However, depending on your setup, it may work with more.

    • If exporting a large amount of issues ends up in timeout, split the range into smaller chunks. For example:

      • In cell A1, use =Jira("<JQL>", "<fields>", 0, 5000).

      • In cell A5001, use =Jira("<JQL>", "<fields>", 5001, 10000).

Example Output

Here’s an example of the output after configuring the export correctly:

image-20241205-154904.png

By following these steps, you can efficiently export Jira issues with the Component Versions field into Google Sheets, even for large datasets.