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!
I finally was able to solve it!
This would do the trick:
{
"fields": {
"team": "{{issue.epic.team.id}}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, it worked! Just had to replace "team" with the custom_field_id in the system. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We'd like too to inherit team from story to sub-task but failed to do so. We managed to get the team from parent but failed to assign it. The team field stayed with "None" value. We've tried several options:
"customfield_10500": {{issue.parent.customfield_10500.id}}
"team": {{issue.parent.customfield_10500.id}}
"team": {{issue.parent.customfield_10500}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've had the same problem.
@Nadav Movshovits - Did you manage to get this to work for sub-tasks?
I can get the Sub-task to inherit the Team field from it's parent but the Team isn't displayed in the field.
I used the below for the Edit issue Action in my automation:
{
"fields": {
"Team": "{{issue.team.id}}"
}
}
I can see the subtask has inherited the issue Team when I do a search, but on the UI the Team is not selected in the dropdown. It still says 'None'.
In addition I can't edit the Team field for a Sub-task
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's a bug for subtasks see: https://jira.atlassian.com/browse/JRACLOUD-76843 team names are inherited by not displayed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Paul O'Shaughnessy
BTW - On further investigation is seems that an Automation isn't needed, because Sub-tasks will automatically inherit the Team from their parent. Once the bug is fixed they should also be displayed :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In order to inherit team down the issue hierarchy, I couldn't find the answer anywhere and then I finally managed to figure it out myself. Hopefully this answer helps others:
Our issue hierarchy is as follows:
Theme -> Initiative -> Epic -> Story/Bug/Task
I set up two rules as follows:
The non epics rule was intended to populate the team field in initiatives and epics from Themes and initiatives respectively. It looks like this:
The action was the following JQL:
{
"fields": {
"team": "{{triggerissue.team.id}}"
}
}
The other automation rule was to cover stories/bugs/tasks having their team field copied from the Epic they are in. This rule looked like this :
and the action part was JQL that looked like this:
{
"fields": {
"team": "{{issue.epic.team.id}}"
}
}
Both of these worked independently, but I need to couple them together so that if a Theme was changed, it rippled down through initiative, epic and story. In order to do this, I checked the checkbox in the rule details for BOTH rules as follows:
This still didn't quite work until I also changed a setting in the Epic rule branch definition to uncheck the following box:
Unchecking this box gives you a warning about performance issues as can be seen above, but I haven't noticed any perceptible change.
Once you've done all these steps, you should be seeing changes to the team field ripple right through.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Bishop Justice
What types of issues are the "parent" and what types of issues are the "child" in your scenario?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Our hierarchy is Initiative -> Epic -> Task/Story/Bug. Ideally Epics would inherit from Initiatives, and Tasks/Stories/Bugs would inherit from their Epics.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 }}"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.