Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can we link multiple issues to a single issue?

Reeta Kumari November 2, 2023

Requirement:

Link multiple issues to a single issue using api call from custom plugin.

Workaround:

iterating list of ids and passing one id at a time for linking.

http://localhost:8080/rest/api/2/issueLink - api (POST)

Body :

{
    "inwardIssue" : {
        "id" : "10617"
    },
    "outwardIssue" : {
        "id" :"10208"
    }, 
    "type" : {
        "name" : "Review Cycle"
    }
}
Query:
I have to iterate for every id instead, don't we have a single api call which accepts multiple issues at a time and links it to a single issue.

2 answers

0 votes
Kristian Walker _Adaptavist_
Community Champion
November 2, 2023

Hi Reeta,

I can confirm that if you use ScriptRunner for Jira Cloud you could use an Escalation service to help achieve this requirement.

The escalation service would find the issues to link and then run the script to link to that issue on each issue returned in the query. 

I can confirm the blog here explains in more detail how an Escalation Service works.

We also have an example that shows how to link to an issue here that can help achieve your requirement.

I hope this information helps.

Regards,

Kristian

0 votes
Himanshi
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 2, 2023

Hello @Reeta Kumari , 

Welcome to the community!

Unfortunately, it is a limitation of this rest API call. 

We have an FR : 

https://jira.atlassian.com/browse/JRASERVER-66329

You can create a script to perform the iterative action using this API call that serves your purpose or can create an automation rule having in Branch query JQL query having lookup issue as per your use and based on that add a Send web request / or perform link issue action. 

I have created a basic one for my test instance: 

Screenshot 2023-11-02 at 3.17.45 PM.png

Try exploring this out.

Have a great day!

Suggest an answer

Log in or Sign up to answer