How To Bulk Link Issues In Jira

Due to unforeseen challenges, we are unable to fulfill the task request. We apologize for any inconvenience this may cause. Jira, a tool designed by Atlassian for managing project issues, enables us to efficiently organize, monitor, and prioritize tasks. A noteworthy attribute of Jira is its ability to link issues, simplifying the process of tracking related tasks, bugs, or stories. If faced with a substantial number of tasks, individually linking issues may become a time-consuming task. However, our guide will assist you in bulk linking issues in Jira.

Pre-requisites

To be able to bulk link issues, you need to have the ‘Link Issues’ permission in your Jira project. Contact your Jira administrator if you do not have access to this feature.

Steps to Bulk Link Issues in Jira

Unfortunately, Jira does not support bulk linking out of the box. However, it can be achieved through ScriptRunner, a popular Jira plugin, or via Jira’s REST API.

Using ScriptRunner

To bulk link issues using ScriptRunner, follow the steps below:

  1. First, you need to select the issues you want to link in the issue navigator.
  2. Next, go to the ‘Bulk Change’ option in the tools menu.
  3. Select the issues you want to link and click ‘Next’.
  4. In the operation selection screen, choose ‘ScriptRunner Bulk Action’ and click ‘Next’.
  5. Select the ‘Link Issues’ operation and enter the relevant details (Link Type, Destination issue key).
  6. Finally, confirm your bulk operation.

Please note that ScriptRunner is a paid add-on.

Using Jira’s REST API

If you prefer a more technical approach, you can use Jira’s REST API. Here’s a basic example using curl:

curl -u email:api_token \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "type": {
      "name": "Blocks"
    },
    "inwardIssue": {
      "key": "TEST-1"
    },
    "outwardIssue": {
      "key": "TEST-2"
    },
    "comment": {
      "body": "Linking TEST-1 to TEST-2"
    }
}' \
  "https://your-domain.atlassian.net/rest/api/3/issueLink"

In the above example, email:api_token is your username and API token, TEST-1 and TEST-2 are the issues you want to link, and Blocks is the link type. Replace these with your own values.

Conclusion

Even though bulk linking is not a built-in feature in Jira, it can be achieved by leveraging third-party plugins like ScriptRunner or using Jira’s REST API. This not only saves time but also increases efficiency when managing large-scale projects in Jira.