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!
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
Hi Bill,
Thanks for getting back to me! Here are the expanded audit logs for both automations:
Issue Created Automation
Issue Updated Automation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
When I went to re-test, the Team field still wasn't being populated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
That would be 4 rules, where #1 would look like this:
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.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy apologies for the delay here, I was OOO!
The 3rd use case most aligns with what my team is looking to achieve: "When a parent Epic changes its Team, update all of the child Stories to match when the parent's Team is not empty."
However, my team is using many issue types at the Epic hierarchy level. There are 10 issue types at this level.
Does this change Rule #3 as is laid out above?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, and welcome back from your OOO time!
To update that rule template, change that first condition to match your types:
condition: issue type is one of Epic_A_Type, Epic_B_Type, Epic_C_Type, ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Thank you!
Okay I updated but I am confused about the last part of the rule you mapped out (see bolded below):
Rule #3 inverts this, as it is from the parent perspective.
The team requesting the automation consists of multiple sub-teams. They don't want a pre-fixed value for the team field. Instead, they want the team field to be populated for all child tasks when it is filled out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I thought you wanted to copy the Team from the trigger issue to the child issues. Is that not the case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy,
Yes, that’s correct—I do want to copy the Team field from the parent to the child issues, but only when it is filled out. Since the team field can have multiple possible values, we don’t want to set a fixed one—just ensure that whatever is selected on the parent gets passed down.
Intended Outcome: When an issue is created or updated, the "Team" field should automatically populate on all child tickets when it is filled out on the parent ticket.
Let me know if that helps clarify!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Smart Values Condition is checking that the value is not empty before the rule continues.
Then in the Edit Issue action, the field may be selected to Copy from Trigger Issue. That will copy all values currently in the parent to the children, regardless of what is selected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for this--however these are the only options I am given for the "Edit Issue" action. I don't see anything where it says to "Copy from Trigger Issue". Could you send me a screenshot of what it should look like for me on my end?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please select your field from the dropdown list, Choose fields to set.
At the right side of the field, there will be a ... option, select that, and then COPY.
Now click on the field, changing the source, Issue to copy value from, to Trigger issue
For example:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is great, however I cannot select my Team field. It only allows me to use the advanced field editing for my field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for confirming that as it shows JSON will be needed instead: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Single-select-custom-field
For example:
{
"fields": {
"customfield_12345" : {
"id": "{{triggerIssue.customfield_12345.value.id}}"
}
}
}
Please your own custom field ID to select and set the value.
If the field is not single-selection, please let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, thank you for this! I really appreciate your diligent help here.
I added in the JSON to define the "Team" field using advanced field configurations you sent me, but it is still not working. The "Team" field in our instance is a "Team Picker (single team)" field type. The automation doesn't seem to be recognizing that a value is getting added to the "Team" field.
This was what was happening when I used your JSON:
{
"fields": {
"customfield_12345" : {
"id": "{{triggerIssue.customfield_12345.value.id}}"
}
}
}
I was instructed to change the JSON to this, but it is still not working.
{
"fields": {
"customfield_10001": {
"id": "{{triggerIssue.fields.customfield_10001.id}}"
}
}
}
Both say "No related issues could be found". Any thoughts here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I recommend focusing on the branch in the audit log. That shows no issues where found, and so based on the earlier rule you showed that means there was no child issue.
Would you please show your current, complete rule?
Also...if the Atlassian Support team is already helping with the rule, I recommend sticking with them for guidance as they can directly interact with your rule and Jira site to help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, here is the full complete rule. Atlassian Support cannot help me with this as they do not do consultative support, unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.