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.
Hi @ben_haynie -- Welcome to the Atlassian Community!
There are a couple of challenges with this scenario: timing and issue scope...
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.