Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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:


1 answer

1 accepted

0 votes
Answer accepted

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

Nice! Good to know! :) 

Suggest an answer

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

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

940 views 2 22
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