Auto-Assign team to an issue
Asked by Hans Keller:

Hello,

is it, by any chance, possible, to auto-assign / pre-populate the team value on an issue?

We have teams being organized by components, each team has its corresponding scrum board that I use as source for the team assignment.

It's kind of cumbersome to assign each and every tiny bug ticket manually to the corresponding team.

Thanks a lot in advance

Hans

![Screenshot 2021-03-22 163107.png](/t5/image/serverpage/image-id/135387i723E71800D6E5CD8/image-size/large?v=v2&px=999 "Screenshot 2021-03-22 163107.png")


Answers:
author: Curt Holley
body: Hi [@Hans Keller](/t5/user/viewprofilepage/user-id/4316118)

You sure can....presuming you are on Jira Cloud???

If so, you can do this via Automation for Jira.

Trigger = Issue Created

Condition = User condition (where you then add the team members)

Action = Edit issue (at this stage the Team field isn't available in the dropdown of fields to select, so you need to use the more options section and set it up as below). Note; you need to know your Team ID (procurable via JQL)

Another Note, if you want to set up more than one team within the one Automation rule, use an "If/Else block" (as below)![Screenshot 2021-03-23 091550.png](https://community.atlassian.com/t5/image/serverpage/image-id/135426i26705E16D25001EF/image-size/large?v=v2&px=999 "Screenshot 2021-03-23 091550.png")


author: Dave
body: Hi [@Hans Keller](/t5/user/viewprofilepage/user-id/4316118),

I think that [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535) has provided a good answer using automation, but I'd like to ask more about your use case if I may?

When you say that you have teams organised by component, does this mean that all teams work within the same project but are responsible for issues based on the component(s) assigned to the issue?

I can see from the screenshot that you have created teams in Advanced Roadmaps but I was just curious to see if you'd used the team field as a JQL filter value to define each team board (rather than say the components themselves). If this is the case then I'd be interested to know how you'd feel about having the team association on the board itself (rather than defined via the team in the plan)?

Regards,

Dave

comments: author: Curt Holley
body: Great question [@Dave](/t5/user/viewprofilepage/user-id/1183605) I was wondering the same thing.


author: Hans Keller
body: Hi [@Lopes_ Bonnie](/t5/user/viewprofilepage/user-id/3922714) [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535) [@Dave](/t5/user/viewprofilepage/user-id/1183605)

thanks for your fast replies and apoligies regarding my delay in answering.

Our Jira is self-hosted, it used to be Server and I guess that it has been changed to Datacenter - but definitely not Jira Cloud (which is not allowed for compliance reasons).

[@Dave](/t5/user/viewprofilepage/user-id/1183605)regading team- and project setup, it's a little bit more difficult, unfortunately (had to "anonymize" it a bit):![Bild1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/135719i07422FD74884615F/image-size/large?v=v2&px=999 "Bild1.jpg")

The whole Setup is Scrum @ Scale. For historical reasons (and compliance), we had to split into several Jira Projects, the blue boxes.

So we have one big project in the middle, where all the backend services are developed by multiple scrum teams and two smaller projects which handle the Hardware/Device portion and the other one catering for all oranizational overhead.

The smaller ones are rather easy, only one scrum team, only one component (if any).

The "Tardis" is more difficult, as we have cases where multiple components are handled by one team (could also be the other way round than displayed in the 2nd Tardis Issue, i.e. Team Rory handling Ami-Rory-issues) or Multiple Components are handled by mutliple teams.
> I can see from the screenshot that you have created teams in Advanced Roadmaps but I was just curious to see if you'd used the team field as a JQL filter value to define each team board (rather than say the components themselves).

The Teams are defined by the corresponding Scrum Boards - e.g. the Tardis Project has 4 Team Scrum boards which are filtered by the value of the component field - we don't use the team field yet (and this sounds a bit like a circular reference - defining the team by using a board which is filtered by the team value defined in the team...)
> If this is the case then I'd be interested to know how you'd feel about having the team association on the board itself (rather than defined via the team in the plan)?

I can't really imagine how this would look like - do you have a practical example?

Best

Hans

comments: author: Curt Holley
body: [@Hans Keller](/t5/user/viewprofilepage/user-id/4316118) you have had way too much fun "anonymizing", but as a Dr Who fan, I love it. Brilliant!!

In terms of a practical example of Team association, it is simply replace filtering the board board via Component/s with filtering via the Shared team. See example:

```
?project = LSTT AND "Team[Team]" = 213 ORDER BY Rank ASC
```

An advantage of using Shared teams, is unlike Components, they can be used across all Jira projects. So it would be easy for Rose Tyler to be in the TARDIS again, Rory could visit Gallifrey etc. :-)

It is also a fairly simple concept for teams to get used to...."For work to appear on our teams board, the work needs to be assigned to the Team".

This leaves the components to be freed up and used not just as a proxy Team field, but for actual components (you know, things like; Relative Dimensional Stabilizer, Exponential Crossfield, Omega Configuration, Spatial Dampeners, and Relative Continuum Stabilizer subsystems) *Sorry, couldn't help myself.*

Example of the Team field (which needs to be added into the relevant Field/ Screen schemes to be visualised) below.

![team.png](https://community.atlassian.com/t5/image/serverpage/image-id/135801iA71B69639DF6CE2F/image-size/large?v=v2&px=999 "team.png")


author: Hans Keller
body: Hi [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535) , fellow Whovian :)

apologies again for the delay, daily business was a little overwhelming the last three weeks.

I guess using global / shared teams will be the right approach for us as well, we already use them partly now (not all teams being on the roadmap now, but some).

Right now I'm in a discussion with our internal JIRA support - they claim that it's not possible to display the "Team" field on an issue type as Adcanced Roadmaps blocks it.

Could this be due to JIRA Server or is there a misconfiguration?

![Teams.png](https://community.atlassian.com/t5/image/serverpage/image-id/141363iE59BDBE499D16962/image-size/large?v=v2&px=999 "Teams.png")

Best

Hans


author: Lopes_ Bonnie
body: [@Hans Keller](/t5/user/viewprofilepage/user-id/4316118) ,

Yes you can add teams to your screens in Jira server, see sample screen shot

[@Curt Holley](/t5/user/viewprofilepage/user-id/3527535)

![Custom field team.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/141406iEC8731DB9980AC5E/image-size/large?v=v2&px=999 "Custom field team.PNG")

[@Curt Holley](/t5/user/viewprofilepage/user-id/3527535) , [@Dave](/t5/user/viewprofilepage/user-id/1183605)

I wanted to do this, but the issue we have, is that I have 200+ teams and because this is a locked field, I cannot change or add contexts. and for us we would need to add project context to have teams by project. But since the team field values are derived from shared team in Advanced roadmaps, and Advanced roadmaps has no concept of project/team relationship, this cannot be done, so we were unable to use team, cause a dropdown of 200+ entries would not be useable.

[@Hans Keller](/t5/user/viewprofilepage/user-id/4316118) , go in with eyes wide open, that the dropsdown is also not sortable. it loads the teams in an order (I think, as they were created in Advanced Roadmaps), because they are not alphabetical. And the managed shared teams in Advanced Roadmaps, does not let you sort them there. You would have to enter them in the order you want them to appear and if you have a new team, oh well, to the bottom they go.


author: Lopes_ Bonnie
body: removing double post


author: Hans Keller
body: Thanks [@Lopes_ Bonnie](/t5/user/viewprofilepage/user-id/3922714) - can you give me some more context where and how to enable this field? I want to give my support the best guidance possible in how to support me.

In regards of the Dropdown / Maintainability: Right Now, we are the only Program using the Porfolio, but Yes, I've already thought about this as well - my solution for now would be:

* Have a field called "myTeam" which eihter
  * Gets all the teams from one specific plan via query (is this possible?)
  * has the teams hard coded
* The field has an on-update-rule and syncs the selected team to the portfolio team field
* And vice versa - when the portfolio team - field is updated, the "myTeams" will be updated as well.

Does this make sense?


author: Lopes_ Bonnie
body: [@Hans Keller](/t5/user/viewprofilepage/user-id/4316118) ,

If you are using Server, you can also change your teams to shared teams and then the teams will actually populate in the Team field dropdown, so upon issue creation and update the teams are available.

We were set up the same way and wanted to take advantage of this but we have over 500 teams across 100 projects and the team field does not allow for adding project context, so we would have had a dropdown of 500 teams, which is un-useable, when with project context we would have just had 5 , which would have been perfect. So we had to create a separate custom field call scrum team where we can provide context and have the dropdown with 5 items per project. The unfortunate consequnce of this is we still have to manually update team for capacity numbers. We can bulk update team using scrum team, or write some automation to do same and will look to do that in our future as we start using our plans more and more.

comments: author: Hans Keller
body: Hi [@Lopes_ Bonnie](/t5/user/viewprofilepage/user-id/3922714) ,

is your setup on server as well?

If I got it right, you have a Custom Teams field which then triggers a rule to populate the regular teams field, correct?

Are you entitled to show the teams field on the issue type itself?

Best

Hans


author: Tran Tien dung
body: does it work in Jira cloud?


Tags: advanced-roadmaps