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.
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.