What smart value can I use to @ a Team?
Asked by Andra Vilcea:

I would like to create an automation where the smart value comments and tags a team instead of one person - what smart value can I use to creat this correctly?


Answers:
author: Curt Holley
body: This is interesting (and part of the problem with the term "Team" in the Atlassian universe currently).

[@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) has focused on the notion of a team in the People section of Jira or confluence. Which I suspect is what you are after [@Andra Vilcea](/t5/user/viewprofilepage/user-id/4900835) ?? *as that is a way of notifying them from the automation rule.*

Where [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) is referencing the Jira premium/Advanced Roadmaps "Team" field. *Which is the field used to add/remove teams created via the "Shared teams" concept in Advanced Roadmaps.* Confusing!!!! *Indeed!
The good news is, Atlassian are aware of this confusion and it is being addressed (sometime) this year.*

I realise I haven't provided any solution for this.....good idea! But thought it worth clarifying that 2 different "Team" concepts have been discussed here.

comments: author: Bill Sheboy
body: Thanks, Curt!


author: Jack Brickey
body: Hi [@Andra Vilcea](/t5/user/viewprofilepage/user-id/4900835) , welcome to the community.

So I haven't tried mentioning teams before, only users. I just spent a few minutes trying to figure it out but was unsuccessful. I thought I would share my results in case it helps you or others figure it out. It may not be possible as yet. Or maybe I'm doing something wrong.

So if you want to mention individuals in automation you cannot simply use the @username method. Rather you must use the accountId like below.

\[\~accountId:557058:ce791733-445e-45e2-a768-3a6h055j074e\]

Understanding this I attempted to retrieve the Account ID for the team buy scarfing it from the URL to the team page as below.

<https://acmeCO.atlassian.net/jira/people/>**437078:cf791783-425j-45j3-a409-6g6b055k074e**

however

\[\~accountId:**437078:cf791783-425j-45j3-a409-6g6b055k074e**\]

did not work. So my guess is the you cannott mention Teams ++OR++ I have the wrong accountId. I may keep playing with this as I have time.

comments: author: Andra Vilcea
body: Hey [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) ! Thanks so much for looking into this. What if we create a variable? Would that work? I'm just not sure how to add the ID into it.


author: Jack Brickey
body: I'm not following you on adding a variable could you explain further?


author: Andra Vilcea
body: It appears you can create a variable to use it as a smart value:

![CreateVariable.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/195066i94C1C39A9D5CBCA6/image-size/large?v=v2&px=999 "CreateVariable.JPG")


author: Jack Brickey
body: Ah, I see. While I haven't tried it yet I don't expect that will work either. Fundamentally, I don't believe that the account ID associated with the team is resolved to the list of team members. If you note when you do an at team mention in a comment it will show a link with the team name and then resolve all of the team members at least that's been my experience. I'm going to reach out to a number of Community leader colleagues to see if they have any experience with this.


author: Bill Sheboy
body: HI [@Andra Vilcea](/t5/user/viewprofilepage/user-id/4900835)

Some *yes, and...* items for Jack's reply:

There are several open requests in this area, starting with there is no public REST API function to get the team/advanced roadmap data, and so there are no automation smart values/functions to use them:

* <https://codebarrel.atlassian.net/browse/AUT-2138>
* <https://jira.atlassian.com/browse/JIRAAUTOSERVER-159>
* <https://jira.atlassian.com/browse/JSWCLOUD-20360>

As a work-around, if your people were listed in a group, you could grab their information via the REST API using a webrequest and then build the mention string for the set.

I simpler, although maintenance requiring, approach is to also store the team information in an entity property and then use it.

Kind regards,  
Bill


Tags: cloud