Forums

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

Jira 9.12.x DC - how to get name associated to Status attribute value in asset through automation

Trudy Claspill
Community Champion
May 8, 2025

I'm working with Jira/JSD 9.12.x Assets, with ScriptRunner 8.45.0

I have an Asset Object that has an attribute of type Status.

Screenshot 2025-05-08 at 10.37.25 AM.png

In an Automation Rule I have successfully used the action "Lookup Asset (Insight) object with ScriptRunner" to retrieve an object with this Attribute.

To get the value of the attribute I have used {{lookupAsset.attributes.Status}} . This gives me a number, not the text.

How do I get the text?

I dumped the {{lookupAsset}} smart value into the log. There are no sub-attributes for State that I can access. Example data:

{id=1135450, attributes={Key=SB-1135450, Name=Something, Status=76, Owner=JIRAUSER81910}, objectTypeId=229, objectKey=SB-1135450}

 

It seems like the only way may be to use the REST API:

https://developer.atlassian.com/server/jira-servicedesk/rest/v1006/api-group-assets---status-types/#api-group-assets---status-types

1 answer

0 votes
Joseph Chung Yin
Community Champion
May 8, 2025

@Trudy Claspill -

Although I have not conducted this type of analysis in our DC env, I believe your assumption is correct that one have to use REST APIs calls to obtain the text value of the Asset object's attribute.

Let me know of your solution, so I can also learn from your findings.

Best, Joseph Chung Yin

Suggest an answer

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

Atlassian Community Events