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

Creating Automation to set the Parent of newly created Linked Issues

ben_haynie February 27, 2025

Within our Jira Instance, most issues will link back to an Epic (or a parent).
I want to build automation so that when I create a brand new linked issue (using the Create Linked Issue button on an existing issue), it will take the Parent from the original issue, and set the new issue to have that parent.

As an example, I have a User Story.  The QA team finds a bug.  So they create a Bug on the User Story, by clicking the "Create Linked Issue" button.
When the Bug is created, I want it to be linked to the same Parent that the User Story is linked to.

I have been playing around with Jira Automation, using ChatGPT and Claude to get there, and I haven't quite gotten it.  Browsing through the archives hasn't quite gotten me there either.

Here is one approach I have taken:
 * When Issue Created

* If issueLinkType IS NOT EMPTY

* For: Linked Issues (this goes through all of the linked issues, which should just be one when the issue is created)

* * Inside the Linked Issue Branch now...
* * If the Parent Exists
* * Log the issue.parent.key for transparency
* * Set the Issue Field ( Copy Parent From Current Issue).

The problem with this approach is that the issue it is looking at is the Linked Issue (the User Story).  I can't figure out how to get back to the newly created bug to set that one.

I tried using a variable, and outside of the branch setting the current issue (the bug), but the variable is empty outside the branch.
Screenshot 2025-02-27 165903.png

2 answers

1 accepted

3 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2025

Hi @ben_haynie -- Welcome to the Atlassian Community!

There are a couple of challenges with this scenario: timing and issue scope...

Timing of rule steps

The Issue Created trigger can fire so quickly that some of the data may not be present when the rule starts.  Additionally, the issue is created before it is linked to the other issue, and so the links may not be ready when the rule starts.

The workaround for both of these is to add the Re-fetch Issue action immediately after the trigger.  That will slow the rule down a bit, reloading the data before it proceeds.

 

Issue Scope in the rule

When branching to the linked issues, the created issue from the trigger is no longer accessible for edits to change the parent.  This is because inside the branch, the linked-to issues are in scope.

The solution for that is using the Lookup Issues action with JQL to get the linked-to issue, and use its smart values to edit the created issue

 

Kind regards,
Bill

ben_haynie February 28, 2025

@Bill Sheboy , that did it!  Thank you so much for your help.

Like • Bill Sheboy likes this
0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2025

Hi Ben - Welcome to the Atlassian Community!

When you are creating the linked issue, why not just populate the Parent field with the value of the issue you are creating it from?

 

ben_haynie February 27, 2025

@John Funk Thank you for the suggestion!  Is there any way to automate this, so that the person creating the linked issue doesn't need to remember what the Parent of the source was?  If we can do that, that would be awesome!

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2025

They are literally on the issue with the parent in front of them when they click on the link to create, are they not? Can they really not remember the parent key for a few seconds?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events