Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Inherit Team field from parent issue using Automation

Our team is using the Team field to organize our Roadmap and Scrum boards. In order to make sure things don't fall through the cracks, I'd like to automatically inherit the Team field from parent tickets when new tickets are created. While this is easy to to do using Automation for fields like Component and Fix-Version, I can't figure out how to get it to work with the Team field since it doesn't show up as a field option. 

 

Does anyone know if it's possible to use Automation to inherit Team from a parent issue? If so, what is the best approach?

 

Thanks!

3 answers

1 accepted

I finally was able to solve it!

This would do the trick:

 

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

Seems to work. Thanks

Yup, it worked! Just had to replace "team" with the custom_field_id in the system. Thanks!

Did you ever resolve this @Bishop Justice ?  

I have tried various approaches including creating a custom variable. I can 'get' the data, but I just can't set the value on Team. 

I'm guessing this relates to: https://jira.atlassian.com/browse/JSWCLOUD-19957 

I couldn't find a way to inherit from a parent but I did figure out how to set the field. I ended up using a conditional on a component and used that to set the team field with the additional field code below. It's not perfect, but it gets the job done.

{
"fields": {
"customfield_10800" : "123"
}
}
Like # people like this

Hello @Bishop Justice 

What types of issues are the "parent" and what types of issues are the "child" in your scenario?

Our hierarchy is Initiative -> Epic -> Task/Story/Bug. Ideally Epics would inherit from Initiatives, and Tasks/Stories/Bugs would inherit from their Epics.

Hi @Bishop Justice 

One way to find smart values for fields you want to access is to identify an example issue with the field and use the REST API to make a call in a browser.  Then look at the JSON to find the name.

Here is the how-to documentation for that method:

https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/

Best regards,

Bill

Thanks for the tip @Bill Sheboy! That helps me find the field I need, but not make use of it. How would I apply a parent's Team field when creating the child using automation? I'm assuming I can do it using the additional fields area in edit issue in automation, but I'm not sure how.

Once you have the field identified, you can first try to use the Edit Issue action with the source as Copy from Parent.

If that will not work, you can use the advanced edit functions using JSON.  Here is some information on how to do that:

https://support.atlassian.com/jira-core-cloud/docs/advanced-field-editing-json/

Unfortunately the team field still isn't updating. Here's the code I'm using to try and pull the Team field from its parent issue. The automation will run but the field is still not updating. Any suggestions?

{
"fields": {
"customfield_10800" : "{{ issue.epic.customfield_10800.asJsonString }}"
}

A couple of more ideas to try:

Please try some log messages to learn what is in the custom field of the parent and child.  Perhaps you need to specifically use something like the following to access the information {{issue.customfield_10800.value}} or .name

Next, I haven't used the syntax of {{issue.epic...}} to access the parent issue's data.  You could try a branch on the parent to access the field instead.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

67 views 4 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you