Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I automate this: when I link an issue, the parent issue also links to same linked issue

April_Delay
Contributor
January 20, 2023

Use case:

I want to link a story (AA-1) to another project issue (BB-1). I want automation that will automatically link the parent Epic (AA-2) to BB-1 as well. So the end result is:

 

AA-1 linked to BB-1

AA-2 linked to BB-1

 

Something like:

Automation: When: Issue linked

Branch rule: For Parent

Action: Link Issue (to the same issue that I just linked)

 

So far I can only find a way to link it to the issue that is being triggered. 

2 answers

1 vote
Trudy Claspill
Community Champion
January 20, 2023

Hello @April_Delay 

You need to look in more detail at the explanation for the Issue Linked trigger.

Screen Shot 2023-01-20 at 11.24.17 AM.png

It depends on the link that you are creating between AA-1 and BB-1, and the "direction" of the link. Whichever issue in the pair gets the Outward Description of the link relationship is the one that will trigger the rule.

If you are in AA-1 and you create a link that says "blocks BB-1", then AA-1 is the issue that will trigger the rule. To link AA-1's parent to BB-1 you would have to use the smart value {{destinationIssue.key}}.

If you are in AA-1 and you create a link that says "is blocked by BB-1", then BB-1 is the issue that triggers the rule. To link AA-1's parent to BB-1 you would have to use the smart value {{issue.key}}.

Trudy Claspill
Community Champion
January 23, 2023

Clarification -

{{destinationIssue.key}} or {{issue.key}} gets you the AA-1 issue. You need to add to that smart value to get the parent of AA-1.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

Hi @April_Delay 

I believe you can try that by referencing the {{triggerIssue.parent.key}} for your linking.

Kind regards,
Bill

April_Delay
Contributor
January 20, 2023

Hi @Bill Sheboy , I tried this out, but it resulted in AA-1 being linked to AA-2. 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

Branching is the key for this as linking is to whatever is the current issue at that point in your rule.  For example:

  • trigger: some trigger
  • action: link some issue...in this case, to the trigger issue
  • branch: to one or more other issues
    • action: link some issue...in this case, to the current issue of the branch
Trudy Claspill
Community Champion
January 20, 2023

Your problem is in understanding which issue, AA-1 or BB-1, is actually triggering the rule. 

What type of link are you creating between AA-1 and BB-1?

Which one becomes the "source" issue? Refer to my Answer above about distinguishing which issue in the relationship is the source issue. The source is not always the one you are in when you create the link.

The source issue will be the issue that triggers the rule. That could be either the one you are in when you create the link, or the issue that you are linking to.

April_Delay
Contributor
January 23, 2023

@Trudy Claspill  and @Bill Sheboy  thank you for the response, it helps immensely.

 

I nmy use case, it is most likely that AA-1 will be the trigger issue. I will try the smart values you've provided to me and let you know how it goes. I am thinking that I may need to put the automation in the BB project or train users to use the Outward direction... whatever the answer ends up being, I'll update my post for others. 

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