Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Automation: Link multiple issues from JQL lookupissues

I am trying to develop and automation that can perform a JQL lookup and then link all of the matching issues to the originating ticket.


I have the trigger, lookup, and edit functions working if the JQL only returns a single field, but if the JQL returns multiple fields the edit issue function attempts to link "issue-1,issue-2" which causes an error. Is there a way to iterate over the {{lookupissues}} variable and pass each instance to the "Edit Issue fields" function?


To add some color this is for our security team who wants to track certain fields like bad-actor IP addresses across tickets, so if bad ip gets added to a special field in the ticket, other issues with that IP in the same field should be linked automatically.


For reference this is my current "Edit issue Fields" Function:

{"update": {
"issuelinks": [
"add": {
"type": {
"name": "Relates"
"outwardIssue": {
"key": "{{lookupissues.key}}"

This is the whole workflow if that's helpful:


2 answers

1 accepted

1 vote
Answer accepted
Alex Koxaras Community Leader Jul 02, 2021

Hi @Thomas Wick 

Will the following automation works for you?

  • Leave the trigger event as you have it
  • Instead of using the lookupissue, use the branch component and choose JQL
  • Write on the JQL the statement you had on your Lookupissue component
  • Inside the branching edit only the linked issue parameter (see pic below)
  • Continue with the rest of your changing on the triggered issue, outside the branching rule




Hope that this was what you well looking for. I tried it, and successfully managed to linked all the issues on my JQL to the triggered issue.

Let me know!

@Alex Koxaras  That worked great. Thanks for the help.

Like Alex Koxaras likes this
Alex Koxaras Community Leader Jul 07, 2021

Nice! Good to know! :) 

Charlie Misonne Community Leader Mar 23, 2022

This is the answer!

Thank you :-)

@Alex Koxaras can you help me in telling me what to do if we want to have a manual trigger, because linked issue is showing only Trigger Issue or recently created issue.

How to link any ticket ?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,167 views 34 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you