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

Automatically assign team to new issues on a team related board

Deleted user November 2, 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

15 votes
frank_dohmen
Contributor
March 5, 2021

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

Abel Lineberger
Contributor
March 8, 2021

Excellent write up!

Like frank_dohmen likes this
Liam McDonald
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!
April 22, 2021

This was beyond helpful - Thank you!

Like frank_dohmen likes this
Sam Clewlow
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!
August 11, 2023

Thanks very much for sharing.

 

I also found that you can find the team id in the following way:

 

1. Using portfolio, assign the team to an issue.

2. Switch back to the backlog view, click on the issue to show the details of it in the right hand column.

3. Click the 3 dots in the top right corner

4. Export XML

5. Search the XML for "customfield_10001"

6. It should show you the id within the XML entry (1 in this case)

<customfield id="customfield_10001" key="com.atlassian.teams:rm-teams-custom-field-team">

<customfieldname>Team</customfieldname>
<customfieldvalues>
<customfieldvalueid="1">Plan-specific team</customfieldvalue>
</customfieldvalues>
</customfield>

 
0 votes
Ulrika Eriksson
Contributor
March 4, 2021

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

Abel Lineberger
Contributor
April 5, 2021

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 # people like this
Ulrika Eriksson
Contributor
April 9, 2021

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

Abel Lineberger
Contributor
April 9, 2021

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.

0 votes
frank_dohmen
Contributor
June 17, 2020

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?

frank_dohmen
Contributor
June 17, 2020

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

Jordan Janis
Contributor
September 25, 2020

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
Geoff Goodhew October 23, 2020

@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?

frank_dohmen
Contributor
October 23, 2020

@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.

Like jennifer.sewell likes this
Jordan Janis
Contributor
October 23, 2020

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!

Jeffrey Bistrong
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, 2020

@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 # people like this
jennifer.sewell
Contributor
September 27, 2021

This is magical!

Like Jordan Janis likes this
0 votes
Tammy Irvine
Contributor
May 31, 2020

Any update on if this is available? 

Peter Foerts
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!
June 16, 2020

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?

Jordan Janis
Contributor
September 25, 2020

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!

0 votes
Thomas Deiler
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 2, 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

Deleted user November 6, 2018

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 6, 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

frank_dohmen
Contributor
December 3, 2019

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events