JIRA Automation: Copy "Team" Field from Parent (Epic) when a new child issue (Task/Bug) is created

mark_liebold
Contributor
November 30, 2023

I am trying to set up an automation that copies the value of the "team" field from the parent (Epic) when a new child issue (Task/Bug) is being created.

Even though the documentation about teams says that you can now use the "team" field in automation, this is not possible when it comes to the "Edit Issue" action, the field does not show up in the selection menu. 

For the action "Field value changed" the "team" field is available, though. 

I am grateful for any advice that will help set up the automation. Thank you! 

4 answers

3 accepted

1 vote
Answer accepted
Thuan, Do Dang
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.
November 30, 2023

Hi @mark_liebold ,

You can try to update by Additional fields like below

Copy Team from parent.png

{
"fields": {
"Team": "{{issue.parent.Team.id}}"
}
}
mark_liebold
Contributor
December 5, 2023

Thank you for the help, it worked! 

Margarita Turina
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 10, 2024

Hi!
Unfortunately this didn't work for me - it says "Additional fields contains invalid field(s) in 'update' or 'fields' section: Team" - but I definitely have the "original" Jira team field, not a custom one.

Could you guess what might went wrong? 

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 14, 2024

Hi @Margarita Turina 

Are you using the Custom Field's ID? Usually that's a more static option than the field name (just in case there's another Team field).

Otherwise, could you provide a screenshot of your Action?

Ste

1 vote
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2023

Hi @mark_liebold 

You can use the Advanced section and JSON to do this.

For example, to modify an Epic's children when the value changes at an Epic level...

  • Trigger: Field Value Changed
    • Field to Monitor = Team
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Epic
  • Branch: Related Issues
    • Type = Children
      • Branch-Action: Edit Issue
        • More options...
          • Additional fields...
            • {
              "fields": {
              "customfield_10001" : "{{triggerissue.customfield_10001.id}}"
              }
              }

---

A few notes...

  • The Custom Field ID (i.e 10001) should match your Team field's ID
  • This is just an example rule, with example JSON. It might differ depending on how the rule is triggered (eg. if it's issue created, or parent being set at a story-level, the JSON could use a smart value which references the epic's team field in another way)

Let us know what you think!

Ste

mark_liebold
Contributor
December 5, 2023

Thank you! I set up another automation where it was needed to change the "team" field in the children when it got modified in the parent and your advice helped me a lot. 

Like Ste Wright likes this
0 votes
Answer accepted
Mayuresh Kamble
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.
November 30, 2023

Hi @mark_liebold ,

Could you please try this in the edit issue action and let me know if it works

{
"fields": {
"team": "{{issue.epic.team.id}}"
}
  

 Regards,
Mayuresh

mark_liebold
Contributor
December 5, 2023

Thank you for the help, it worked. However, I went with "parent" instead of "epic" in the JSON. 

0 votes
Josh
Contributor
August 7, 2024

Is anyone aware of a feature request to make this important "team" field available as a field to edit in automation?

The workarounds above are very helpful, but an admin shouldn't have to go through all the hassle to do something like this.

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.
August 8, 2024

Hi @Josh 

There are several open suggestions related to adding the Team (and other missing fields) to the dropdown list for automation actions.  Here is one of them:

https://jira.atlassian.com/browse/AUTO-525

Kind regards,
Bill

Like Josh likes this
Josh
Contributor
August 8, 2024

Thank you, @Bill Sheboy

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