How can I access Shared Team via automation
Asked by Anita Doma?ska:

I've noticed that I cannot see Team (which is a Advanced Roadmap field) via Jira automation.

I would like to paste there value of my custom field Team Name.

In general we're using Team Name (custom field) all over the Jira and we would like to find a way to link it with Advanced Roadmaps Team. Otherwise I need to store this value twice.

I will appreciate any hints.

<br />

Thanks,

Anita :)


Answers:
author: Alexa
body: A way to dynamically copy the Team field of the source issue to the destination issue: <https://community.atlassian.com/t5/Jira-Software-questions/Teams-option-unable-to-edit-using-automation/qaq-p/2197615#M291300>


author: Curt Holley
body: Hi [@Anita Doma?ska](/t5/user/viewprofilepage/user-id/4391017)

See example below. you could build something like it, but instead of looking for the reporter, it could look at your custom team field. It could be an If/else condition rule where each else is another team to shared team mapping.

![Screenshot 2022-02-24 153359.png](https://community.atlassian.com/t5/image/serverpage/image-id/185114i5868E3D8ABA564B1/image-size/large?v=v2&px=999 "Screenshot 2022-02-24 153359.png")

Alternatively you could replace your custom team field with shared teams. You would just need to do a per team bulk edit and then hide/remove the custom field so people have to adopt the new Team field.

comments: author: Anita Doma?ska
body: Hello [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535) - you reply was very helpful.

I would like to make if/else...where I'm checking if shared team name equals values:

If value = Team-A

{label = team-A}

If value = Team-B

{label = Team-B}

This way I will then fill in my custom field base on the label value...also labels are used for the teams by another tool Im using - BigPicture.

Are you able please to advise how such expression would look like?

I'm not a programmer and was trying to find a way for that...

Thanks in advance,

Anita


author: Curt Holley
body: HI [@Anita Doma?ska](/t5/user/viewprofilepage/user-id/4391017)

Can I confirm.... you want to compare the "Shared teams" Team field to a label that is being used for denoting team info, but you also have a custom field of Team/s.

Also, it sounds like you have both Big picture and Advanced Roadmaps and you want team continuity across both.

Do I have all of this right?


author: Anita Doma?ska
body: Hello - first of all apologize for delay. Thank you for taking your time on answering me.

Yes you got it right [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535)   

Advanced Roadmaps shared team field - we just started to use it, we would like to check if this tools isn't better for us for capacity planning than BigPicture.

Team Name (custom field) has longer history and is used by several boards, filters etc and when we change this field...we also change the team label. Team labels are used by BigPicture - this can be easily managed by automation.

This idea I asked you about is the best that came to my mind....


author: Curt Holley
body: Ok then [@Anita Doma?ska](/t5/user/viewprofilepage/user-id/4391017)

If you want to trigger the automation from the shared team field to check a label, then update the custom field...., then something like this:

Where Team = Shared teams in Jira (and team 6 is the START-AT team). Teams is your custom field and (in this case) "START-AT" is the relevant label.

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

But you could swap the trigger around, or do a scheduled run to catch and update nightly or whatever.


author: Anita Doma?ska
body: [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535) thank you a lot.

Thanks to your advises I managed to link 2 fields in automation and now Team name updates Shared team name.

![2022-03-07 10_55_34-Automation - JIRA ? Mozilla Firefox.png](https://community.atlassian.com/t5/image/serverpage/image-id/186681i25D13CBE28D52C88/image-size/large?v=v2&px=999 "2022-03-07 10_55_34-Automation - JIRA ? Mozilla Firefox.png")


author: Sheri Widler
body: I would like to assign a shared team based on an assignee who exists in the shared team. Any help?


author: Curt Holley
body: [@Sheri Widler](/t5/user/viewprofilepage/user-id/4925887) See my screenshot from Feb 23 2022 above.  

Just use assignee instead of reporter in the condition.


author: Sheri Widler
body: That is too much maintenance. What I want to do is this:   

When an issue is created and assignee OR creator is in Team = X, assign shared team X to the request.

<br />

When assignee is updated, and assignee is a member of Team = X, assign teh shared team X to the request   

The only problem is if members are in more than one team, but I am ok with that.   
Can you help?


author: Sheri Widler
body: [@Curt Holley](/t5/user/viewprofilepage/user-id/4971604) [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535) - just @ ing you to see if you can help.


author: Curt Holley
body: OK [@Sheri Widler](/t5/user/viewprofilepage/user-id/4925887) I can certainly make suggestions, but if you think one rule is too much maintenance I'm doubtful you will like what comes next.

That said, it is true! the issue with these kind of rules is, they do require maintenance. As in, the team members need to be kept current, otherwise the rules just cause confusion. *But that is the same for any referenced list/schema etc.* only as good as how well it is maintained.  
it is also true that, considering you want to cover off assignee and reporter, this could confuse people regardless and will likely not be perfect. But......  

Based on what you want, I would do a rule just like the 23 Feb one, to cover off the reporter side of things.  
Then I would create a rule.  
Trigger = Field value changes (where field is Assignee, for Create and Assign issue)  
Condition = Issue fields condition where Assignee is one of (list of team members)  
Action = Advanced Edit field (same as before) where you edit the shared team.

Might pay to add a JQL condition to the 1st rule of; If "Team\[Team\]" is EMPTY and tick the "Check to allow other rule actions to trigger this rule." So that the assignee takes priority.   


Tags: advanced-roadmaps

automation

cloud

share