Automation Q - Sync Team Field: Parent to Child

Claudia Dimick February 12, 2025

Hello Atlassian Community,

This is one of my first automations I have ever created for my company and I really need help. 

Automation Intended Outcome: When an issue is created or updated, automatically populate the "Team" field on all child tickets when the "Team" field is filled out on the parent ticket. 

I have created two separate automations: 

 

1st automation - for when an issue is created

2nd automation - for when an issue is updated

 

Neither automation is firing right now, so I'm curious what I am doing wrong. Any help is greatly appreciated!

Issue Created 2025-02-12 at 1.46.26 PM.jpg

Issue Updated 2025-02-12 at 1.46.40 PM.jpg

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.
February 12, 2025

Hi @Claudia Dimick 

Please post an image of the audit log details, expanding all of the sections / dropdowns.  That will help provide context for what is happening.

Until we see that...

You describe wanting to update the Child issues when the Parent's Team field changes.

Then condition to test if the Parent exists is not needed because the intended trigger is the Parent, correct?

 

You could create an additional rule (for Child issues) in case someone manually changes the Team field, allowing it to be reset back to the Parent's value.

 

Kind regards,
Bill

Claudia Dimick February 12, 2025

Hi Bill, 

Thanks for getting back to me! Here are the expanded audit logs for both automations: 

Issue Created Automation
Issue Created 2025-02-12 at 3.20.46 PM.jpg

 

Issue Updated AutomationIssue Updated 2025-02-12 at 3.21.36 PM.jpg

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.
February 12, 2025

Thanks for those images, and let's focus on one rule at a time, starting with the Issue Created one.

First, when using the Issue Created trigger, always add the Re-fetch Issue action immediately after the trigger.  The reason is that trigger can fire so quickly that some of the issue data may not be available to the rule yet...causing problems later.  The re-fetch will slow the rule a bit and reload the data before proceeding.

Next, please remove that Parent condition I noted earlier.

Looking at the log, VPMPROJ-704 did not have a value for the field, causing the condition to fail.  Does that sound correct?  If not, it may have been caused by the missing Re-fetch action I noted earlier.

 

Please make those changes, and then re-test your "created" rule.

 

Also please note: both of your rules have the same trigger, Issue Created.  Did you want the "updated" one to instead use the Issue Fields Updated trigger for the Teams field?

Claudia Dimick February 12, 2025

Focusing on the issue created rule, I removed the parent condition and added the Re-fetch issue action. This is how it is now set up. 1.jpg

 

When I went to re-test, the Team field still wasn't being populated.2.jpg

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.
February 12, 2025

Thanks for those updates and additional testing.  That shows when the Story was created, it did not have a Team value, and...when the Epic was created, it did not have any children yet (which makes sense).

 

Let's review the possible cases and which thus which rules may be needed.  I am assuming you are only using Epics and Stories; please let me know if there are other issue types used.

  1. When a Story is created with a parent Epic, copy the Team field from the parent Epic when the parent's Team is not empty
  2. When a Story is changed to a new parent Epic, copy the Team field from the new parent Epic
  3. When a parent Epic changes its Team, update all of the child Stories to match when the parent's Team is not empty
  4. When someone manually changes the Team for a Story with a parent Epic, set it back to the parent Epic's value when the parent's Team is not empty???

 

That would be 4 rules, where #1 would look like this:

  • trigger: issue created
  • action: re-fetch issue
  • related issues condition: parent exists
  • smart value condition:  (Please use your custom field id in place of "team")
    • first value:{{issue.parent.team}}
    • condition: does not equal
    • second value: leave as empty
  • action: edit issue to set the field

Rule #2 would be nearly the same, with a different trigger checking for a change to the Parent

Rule #3 inverts this, as it is from the parent perspective.

  • trigger: field value changed for Team
  • condition: issue type equals Epic
  • smart value condition: (Please use your custom field id in place of "team")
    • first value: {{issue.team}}
    • condition: does not equal
    • second value: leave as empty
  • branch to child issues
    • action: edit issue to set the field

Rule #4 would be nearly the same as #1, with a different trigger on field value changed for Team

 

How does this compare to what you are trying to accomplish?  Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events