Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Jira Automation - link new issues on different parts of a rule


I have a working part of a rule where:

1. an issue is created

2. the branch "For the most recent created issue" creates another issue and links it to the one above.

I need to link an issue created in this branch to another issue too.

I tried the same approach when another issue is followed by the branch "For the most recent created issue" but didn't find a way to pass there issue key of an issue created before.

Using JQL looking for an issue with some custom field value doesn't pass it.

Appreciate any idea.




2 answers

1 accepted

0 votes
Answer accepted

@Ivan Donigevich

I'm not quite following exactly what you are trying to do, but I'd take a look at using the Create variable action.


You can use this to store a value which you can access later. So after creating an issue, perform the action


Screen Shot 2021-02-24 at 12.58.49 PM.png


You can then later access this variable using {{recentissuekey}}.

Hi @Ivan Donigevich 

Yes, and... to the suggestion from @Kian Stack Mumo Systems 

Create Variable has some limits for scoping, so if you create a variable inside of the branch it may not have a value elsewhere in the rule.  As a work-around you may want to create the variable and assign it to {{createdIssue.key}} before you branch.

Please see this article for some "spirited conversation" on this topic:

Best regards,


Kian, Bill,


Thank you for the prompt response.

I guess using the variable value should be for the 2nd linked issue via Editing Issue action in its Additional fields section where I can assign an issue key and a link type to sub fields of Linked Issue field in JSON.

Can you please suggest how these sub fields are named and the assignment would look like? Here I haven't found them.




@Ivan Donigevich

I'm not quite sure that I'm understanding what you are asking. Perhaps a screenshot of the rule would be helpful.

Moved to reply section

Ivan, would you please post an image of your rule?  That may provide some context for the community to help you on this next question?  Thanks!




The actions are that.

The long arrow shows extension of the rule, the blue one - what issues are to be linked, the short arrow - where I'm going to edit the most recent issue and what issue key with.

So here:

1. Story and 2 Tasks are created, then the Tasks are linked to the Story (the left part of rule)

2. The right part: Task is created and it is to be linked to the 2nd Task.





Linking issues.png

Thanks for that image of the rule.

Just to check, is this working as you expect?  Branches run asychronously and so do not necessarily complete before the following steps, leading to timing issues in rule execution.  The 3rd task you are creating is *outside* of the branch, and so it is unclear what the value of "most recently created issue" will be:

  • it could be nothing (no tasks created yet), or
  • it could be the first task created, or
  • it could be the second task created.

If all of the creates are within the branch (or outside of a branch) you can probably expect the steps occurring sequentially.

Yes, it's working correctly, the issues are created and linked in the order they are in the main rule and its branches. I believe as the branches are on different levels of the main rule trunk, a fork point stops going down the trunk till a branch is finished. Eventually it just expected to be so!)

Unfortunately branches cannot be nested else I would resolve this case easily. So now I need to know how to put a value in sub fields of linkedIssue field. Probably it can be done in Additional fields section of the Edit Issue fields action.

Ivan, I am glad to hear it appears to be working, and...

Just to confirm what I was describing: the way the rule appears in the editor does not guarantee execution order when there are branches.  Once you reach the point of a branch, anything inside of the branch gets queued to execute independently.  The documentation states that branches with only one issue stay in-line (sequential), however some recent posts in the community indicate this is not the case.  So, buyer beware for timing issues.  ;^)

Best regards,



Thank you for the support.

Even if branches work simultaneously I believe each works on the most recently created issue related exactly to it and not on some created later for another branch or so.

Anyway I would test passing createdIssue.key to another issue's linked issue field as I can't see another way to link 2 issues created in different parts of a rule.

So the current question is how to assign values to the Linked Issue sub fields in JSON.



Ivan, what values do you want to assign and to which fields?



I'm going to get an issue key of one of tickets to be linked in some variable as it's suggested by Kian and to assign it to the Issue sub field of another ticket's Links field. Also I want to assign a link type to the Linked Issues sub field.

So I expect to get in JSON section of Edit Issue action something like that:

"fields": {
    "Links": {
           "Issue": <Variable with {{createdIssue.key}}>
            "Linked Issues": "blocks"

But I don't know how the Links field and its sub fields can be applied - here they aren't available in the list. Does it mean - no way?




 Linked Issue.png

To add links with types using JSON, please look at his documentation:

But if you are instead trying to "walk the tree" downward, updating issues in linked issues from the JSON, I do not believe that can work.  A specific issue must in scope (e.g. within a branch, or triggerIssue) for the JSON to work.



Thanks a lot for the link - it's what I've been looking for.

I will play with Linking issues JSON - hope it will help. Anyway I don't see another way to pass parameters of one issue to another.




Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Published in Confluence

Product feedback on Inline Comments

Hello Community members! We have an upcoming research study for Confluence and we’d like to invite you to provide advice and answer questions. We’re developing a new experience for Inline Comment...

89 views 7 5
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