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).
How do I get the Id attribute in Automation rule? {{issue.customfield_10582."Id"}} gives me 38.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @KC Wong
What if you try the smart value, {{issue.customfield_10582.attributes.flatten()}}
Store this in a variable and then split it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.