In our Jira we have things set up like this:
Feature Issue in Project #1
>Epic Issue in Project #2
>>Risk Issue in Project #2
The Epic issue is linked to the Feature issue in a Parent/Child relationship. While working on the project, we will add Risks to the Epic issue using a Risk relationship ("Exposes risk to"/"Incurs risk from"). The goal is to have this Risk automatically linked to the Feature issue using a Risk relationship at the same time.
I have used the Automation system to monitor for any time the Risk issue link type is used and, if the destination issue type is also a Risk, run an action that's intended to link the Risk issue to the Feature Issue via the Risk issue link type, as well, but I'm having issues making it happen in a targeted manner
I either can't get it to work at all or I can get it to link to all of the issues linked to the Epic issue, but we have other issues linked to the Epic via other link types; there is only ever a single Parent/Child link assigned to the Epic, though, so if I can target that link type specifically I could get this to work the way we need it to.
I know that I'll need to write some JSON to accomplish this and I can find examples of how to add issuelinks that way, but I can't find anything about how to target it properly.