Smart value of Team name for an issue

Harmeet Singh January 14, 2022

I am trying to get the Team name smart value from the issue. Looking at the api the teams is a custom field that is only returning a numeric id and no name or description. What could be the reason for that? 

My Jira admin said that teams is a system field and therefore is different than a custom field. If that is true then is there a way to get the name of the team as a smart value? 


Screen Shot 2022-01-14 at 3.21.20 PM.png

4 answers

3 votes
Paul Stahlke June 5, 2023

I was able to get the Team value using the following. Replace 10001 with your Team custom field id.

{{issue.fields.customfield_10001.name}}

The below also works, though I'm not sure why Atlassian uses both a name and a title. They appear to be identical looking at the API data.

{{issue.fields.customfield_10001.title}}

0 votes
Kirk Stevens February 20, 2024

Hi @Harmeet Singh 

I've managed to create an automation rule that grabs the Team Id from the parent and updates it to the issue in question.

I did this by creating a variable called {{Teams}} and used the smart value {{issue.customfield_10600.id}} where [customfield_10600] is the Teams field.

Our customfield_10600 is now an object with "id", "name", "avatarUrl", "isVisible", "title" and "isShared" as variables.

Time has progressed since this question was originally posted but in cases this hadn't been resolved, I thought I'd share.

Cheers


 

0 votes
tasha tokunova March 30, 2022

Try {{issue.customfield_12313240.id, "18888"}}

Harmeet Singh March 31, 2022

that will not work because as you can see from the json the custom field does not have an id variable. 

And also I am trying to get the name of the team instead of the id. 

0 votes
Kristján Geir Mathiesen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 14, 2022

Hi @Harmeet Singh 

Not sure but have you tried .id or .value behind the custom field? Like:

{{issue.customfield_12313240.value}}

You could also take a look at this documentation -> https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/ 

HTH,
KGM

Harmeet Singh January 14, 2022

Hey @Kristján Geir Mathiesen ,

Yes I have tried that and since that api does not have the custom field as an object therefore the id and value is just null. 

Kristján Geir Mathiesen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 14, 2022

Sorry @Harmeet Singh  then I am stumped :/

Hope someone can help you out,

KGM

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 17, 2022

Hi @Harmeet Singh

I am under the impression that Teams is still in EAP and, as such, isn't supported by Automation yet.

Cheers,

Simeon.

Suggest an answer

Log in or Sign up to answer