Creating Automation to set the Parent of newly created Linked Issues

ben_haynie
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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

1 answer

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
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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
AUG Leaders

Atlassian Community Events