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.
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:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.