Forums

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

Jira Automation to Copy All Issue Links from Children to Parent

Alexandria _Lexi_ Codd May 5, 2025

I am trying to have any work item link that is linked to my QA, Dev, and Requirements subtasks automatically linked to the parent task. 

This isnt working, I believe because of my IF condition, its only copying links for work items that match the type "QA" "Dev" or "Requirements"  and not linking "Bugs" and "Stories" for example. 

If I remove the IF condition it doesn't link anything tho.
What I am doing wrong?

linked items.png

Example of what I would like :

Parent: JIRA-12 (STORY)

  • CHILD: JIRA-13 (DEV Subtask)
  • CHILD: JIRA-14 (QA Subtask)

MISC ITEM: JIRA-15 (BUG)

create a link from JIRA-13 to JIRA-15 -> Automatically copy that link from JIRA-12 to JIRA-15

 

 

1 answer

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.
May 5, 2025

Hi @Alexandria _Lexi_ Codd 

For automation rule questions, please also include the audit log details showing the rule execution (with all areas at the right side expanded).  That will help compare which steps ran and upon which work items.

Until we see that...

Please note many work item links types are directional.  For example, "blocks" and "is blocked by".  And, the Work Item Linked trigger runs from the "source" to the "destination" of the links, regardless of on which work item we add the link.  @Trudy Claspill provides a great explanation of that here.

And so solving what you describe may be as simple as linking specifically to the {{destinationIssue.key}} or it may involve adding conditional logic to ensure the correct work item types and link types happen as you want.

Kind regards,
Bill

Alexandria _Lexi_ Codd May 6, 2025

sure thing, there just wasn't anything really special in this particular audit log

link5.png

i did see the explanation of the directionality of the links in the rule trigger description, i was hoping to have the links copy regardless of directionality and that there was a simple rule template someone had out there that would just copy any links children had to parents.

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.
May 6, 2025

First, I recommend not changing the rule when trying to understand its behavior, only changing it when it does not work as expected, and then testing further.

 

Based on the log you show, the link directions are impacting which issue is the "trigger / source" versus the "destination" for the linkage.  And, there is not one-rule-works-for-all solution for these cases.

For a possible solution when one wants to handle both possible link directions, the rule needs an if / else block to test the work item types, and then put the branch in side accordingly.  For example:

  • trigger: issue linked
  • if / else block with a condition testing the trigger issue's type
    • branch: to parent (of the trigger issue)
    • ...handle this case
  • else / if condition to test the destination issue's type
    • branch: using JQL to get to the parent of the destination issue
    • ...handle that case instead

 

Alexandria _Lexi_ Codd May 6, 2025

bummer theres not a generic "copy all links solution"

thanks!

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