How to automatically link an issue to the parent/epic when the issue is linked to the story/child?

Presli Martinez
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!
September 11, 2024

When I link an issue to a story/child issue I need the issue to automatically link to the associated epic/parent as well. How could I create a rule to achieve this?

 

This is what I have so far. I'm not sure what the JQL is to direct the action to the epic rather than the child issue.

Screenshot 2024-09-11 084615.png

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 11, 2024

Hello @Presli Martinez 

Welcome to the Atlassian community.

Issue Linked is a special trigger because two issues are involved in the link. But the rule is triggered by only one of those issues, actually. Jira looks at the link relationship that is created between the two issues and the one that is considered the "source" in the relationship is the one for which the rule is triggered. That may not be the same as the issue you are viewing when you create the link. That is an important distinction.

You need to make sure that you understand which issue is going to be the source/trigger issue and which will be the destination issue for each link you create.

For a more detailed explanation of that topic, refer to the answer I posted on this Question:

https://community.atlassian.com/t5/Jira-questions/How-can-I-get-field-from-linked-issue/qaq-p/2807497#U2807518

Let us say issue A is the one that has the parent, and you are linking issue B to A.

If the rule is triggered by issue B then to create a generic issue link to A's parent you would simply use the Link Issue action (no branching needed) and for the parent to which you are creating the link you would use the smart value {{destinationIssue.parent.key}}

If the rule is triggered by issue A, then you do need a branch - For: Related Issues: Destination Issue. That shifts the rule activity focus within that branch to issue B. Within the branch you would again use the Link Issue action, and to specify A's parent as the issue to which you want to link you would use the smart value {{triggerIssue.parent.key}}

Note also that if Issue A, B, and the parent of A are not all in the same project then the rule you create will have to have a Multiple Project Scope and call out all the projects that could possibly be involved, or be a Global rule to include all projects in the Jira instance.

Suggest an answer

Log in or Sign up to answer