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

Automatically assign team to new issues on a team related board

Deleted user Nov 02, 2018

Jira + Portfolio. One development project. Six dev teams. One board per team.

 

When I create an issue in the backlog of one of the boards, I want this board's team to be automatically assigned to this issue. 

 

How do I do that? 

 

 

5 answers

After a while, I came back to that riddle and finally found the solution, because I hate unfinished business.

My latest requirement: 
1 backlog, multiple advanced roadmap teams, each a separate board (with separate sprints but equal naming convention). As soon as a ticket (any type) is moved into one of the team boards sprints (or changed manually for the sprint), then I like the automation to set the corresponding team automatically.

Solution in JIRA Automation:
1. Use any trigger, in my case "field value changed" --> "sprint" value changed
2. Then use "new condition" here "JQL condition" query --> sprint = "ABC" (funfact you don't need to try adding wildcards within "", add just one part of your usual sprint names here e.g. Team1, whilst the entire sprint might be called Y21CW09-11...Team1....

If true

3. Use "edit issue field" and go via "more options" - "additional fields" to have more freedom.

Take this JSON:
{
"fields": {
"customfield_10001": "24"
}
}

I'll explain how you find the customfield for your JIRA "team" field and the team IDs later. First of all, if you have like 3 teams, you simply multiply the steps above by making use of further "else-if" conditions for the other teams and sprint names.

How to identify the custom field ID for "Team":
You have to have admin rights to go via settings --> Issues (includes fields) --> Custom Fields --> search for "team" and hit the "..." menu on the right for that particular (locked) field. Then "view field information" and have a look into the browser URL field. Tadaa!

How to find your team IDs:
read my post here from Oct 23rd 2020.

With that working JSON you can create any logic for the automation, which might help your teams /POs to cope less with annoying manual steps to set the right teams.

Regards

Excellent write up!

Like frank_dohmen likes this

This was beyond helpful - Thank you!

Like frank_dohmen likes this
0 votes
Thomas Deiler Community Leader Nov 02, 2018

Dear @[deleted],

assigning a team to an issue is not possible, but you can create a mailing list and create for this list a Jira account. (one list = one team). When assigning the issue to this account, all team members get notified.

This "automatic thing" will not work. If you have 6 boards, then at least your board filter must be clever enough so that one new issue does not pop up on all boards simultanously. Lets say you use labels Team_1, Team_2, ... then you have to set this label on issue creation.

To automate this, the logic "I am on board of Team_2, so I prefill labels with 'Team_2' and set assignee to account 'Team 2'" has to be injected when you press this create issue link. That's Jira Software.

Auto assign could be managed by components, if you use them instead of labels. There you can define a default assignee (Team_1, Team_2,..) per component.

So long

Thomas

As we're using Portfolio, there is a team field in the issue screen (standard level issues, e.g. user stories). And it's assignable, so I can assign a team to an issue. 

What I'd like to have, is to fill this field automatically, whenever an issue is created within the board.

The board filter looks like this: 

project = PROJECT AND Team = 4 ORDER BY Rank ASC

 

Thomas Deiler Community Leader Nov 06, 2018

Dear @[deleted],

the 'Team' field is most likely a custom field introduced by Portfolio. To fill this automatically you need to extend either the board functionality (Jira Software) or when done on the Portfolio Screen within that plugin. For both you can create a suggestion at https://jira.atlassian.com

If you do not like to wait there will be no other way to do it on your own. Eventually with groovy scripts, but I doubt that this "On which teams board am I?" is easy.

So long

Thomas

Got here as well and didn't find a "set default team" option end of 2019 :D

Any update on if this is available? 

I'm also looking for this. But besides that, I have the problem that I can't assign Private Teams to any initiatives, I've created my Team in Advanced Roadmap, but it doesn't show when I'm selecting the Teams custom field.

When I create a shared Teams, this is visible. But it doesn't work that well for me as the capacity has to be indicated in hours, not story points.

Any pointers on this?

Peter,

Private Teams in Advanced Roadmaps are only available in the Plan where they're created.  You can assign the plan-specific team to an issue and it will be visible in Jira.  However, if you want to assign a team to an issue in Jira, then the Team must be created as a  Shared Teams in Advanced Roadmaps. See here: https://confluence.atlassian.com/advancedroadmapsserver/showing-advanced-roadmaps-custom-fields-in-jira-857058481.html

If I understand your last sentence correctly you do your capacity planning with story points.  This has to be enabled in Advanced Roadmaps by going to the Configure screen and choosing "Scheduling".  There you will see the Estimation options and can choose to estimate in Days, Hours, or Story Points.

Hope that helps!

Hi, I recently found the "Automation Rules" to be very helpful for many things.
In my case, inherit Epic fixVersion to childs automatically when added or created withing the Epic, and secondly propogate fixVersions to all childs if an Epic is rescheduled for another release. Works like a charm.

You can find the Automation Rules in the System Config section if you are a full admin.

This is just a hint, as I didn't figure out how to add the custom field "Team" of portfolio to a rule via JSON code within the advanced options for the Automation. If this is possible and also to detect the board ID on which a ticket was just now opened, then it might be the magic we need as a workaround. Letdown, it has to be created from within the backlog/board to work I guess.

As mentioned, just a hint, as I didn't get to the bottom of it and don't know when I can spend time on this. Maybe someone with more skills in JSON and understanding the JIRA DB and Fields better can solve it?

Hmm, based on the different board filters one item could exist on multiple boards which neutralizes the above idea kind of...

Hi Frank,

You can add Team values to an issue using Automation via JSON but you need to know the custom field ID of the Team field.  It would look something like this:

}
"fields": {
"customfield_12115": "396"
}

where "12115" is replaced with whatever the custom field ID for Team is in your system and "396" is replaced with the Shared Team ID from Advanced Roadmaps.

Also, our automation is set up to assign the Team field when an issue is assigned to a Sprint.  We use a naming convention for our sprints that includes the Team name (e.g., Sprint 3 - ABC).  Then, in the Automation script, we use a JQL condition to determine which sprint the issue has been added to (e.g., "sprint = "ABC""). So when the Sprint value is changed in an issue then, based on the sprint name, we can assign a Team value.

Hope that helps!

Like # people like this

@Jordan Janis thanks for this - I'm trying to do the same thing. I'm now stuck trying to find the ID for a shared team. Is there an easy way to do this?

@Geoff Goodhew

I'm usually using the following in the JQL advanced query field to find out the ID to create board filters etc. haven't found a more clever way yet.

JQL query field:
"Team[Team]" in (xyz
xyz is your team name initial characters, when the context helper pops ups you can select the team and it takes it as ID into the query.

What Frank said.

JQL will automatically convert the Team name to an ID - just as it does for Sprint names.  So, it's a bit tedious if you need a lot of IDs but they never change so just keep a record of them!

@Jordan Janis this solution worked for me

 

I also used https://XXXXXXX.atlassian.net/rest/api/2/issue/CR-546?expand=names to identify the field name and it's value. Thanks a bunch!

Like Jordan Janis likes this

Is it possible to automatically remove a team field from issue when moving to another JIRA project?

Yes.

In the Workflow Editor:

  1. On the transition for creating the issue (the one starting with a round grey circle),
  2. Add a Post Function
  3. Update Issue Custom Field
  4. Select "Team"
    1. If you have Tempo installed, you will have two Team entries, one of which will be attributing the work to a work "Team" the other possession of the issue to a Advanced Roadmap / Portfolio "Team".  You generally want the second one.
  5. Leave the Custom Field blank.
  6. Select "Update" or "Save".
Like Ulrika Eriksson likes this

Good idea, but how is this changed when moving between Jira projects?

When you move an issue, are you moving it to the beginning of the next project's workflow?  If not create a transition to the status you wish the new entries to start that includes the same info as above and use that transition as the entry point.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

851 views 2 22
Read article

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