Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation smart value accessing Assets object attribute named "Id"

KC Wong
Contributor
October 23, 2025

I have an Assets object. It's id in Jira is 38 (as seen in the URL), and it has an "Id" attribute from Azure AD (in the lower right).

Assets.png

 

How do I get the Id attribute in Automation rule? {{issue.customfield_10582."Id"}} gives me 38. 

2 answers

1 accepted

0 votes
Answer accepted
Marc - Devoteam
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.
October 23, 2025

Hi @KC Wong 

The problem is the name of the attribute, if you call this for example AD Id, then you could use:

{{issue.customfield_10582.AD Id}}

Seems like Id, id or "Id" will always return the  object ID of the asset, not the attribute the is named Id

 

 

KC Wong
Contributor
October 23, 2025

I use a plugin called Azure Sync for Jira Assets to perform scheduled sync, and it does not allow editing the mappings. Id in Azure will always be Id in Assets. 

I tried using {{issue.customfield_10582.attributes}} and that when using Log Action gives me this: 

[dfc7ecf2-a671-42fa-ba23-6be73dfdfc60, Group 1, GS-38, 14/Oct/25 4:37 AM, 14/Oct/25 4:37 AM]

That is an array with a single element, the commas are actually data, proven by {{issue.customfield_10582.attributes.first()}}

But if I tried to further process it with {{issue.customfield_10582.attributes.first().split(",")}}, I get an empty string. 

Marc - Devoteam
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.
October 23, 2025

Hi @KC Wong 

What if you try the smart value, {{issue.customfield_10582.attributes.flatten()}}

Store this in a variable and then split it.

Bill Sheboy
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.
October 23, 2025

Hi @KC Wong 

Yes, and...to the suggestions from @Marc - Devoteam 

I recommend adding a trim() function after the split(",") to handle any possible parsing variation of a comma versus a comma-space delimiter.

 

Kind regards,
Bill

Like Marc - Devoteam likes this
KC Wong
Contributor
October 23, 2025

That worked, the actual object type from .first() is unclear, storing in a variable forces it to become a string. 

0 votes
KC Wong
Contributor
October 23, 2025

Printing {{issue.customfield_10582.attributes}} gives me: 

[dfc7ecf2-a671-42fa-ba23-6be73dfdfc60, Group 1, GS-38, 14/Oct/25 4:37 AM, 14/Oct/25 4:37 AM]

But there has to be a better way then to depend on the attribute order. 

That turns out to be a single element array. The commas aren't delimiting the elements, they are the content. 

So calling .get(0) on that is useless. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events