Lookup Asset (Insight) Object
We've provided an easy way to look up/retrieve Insight/Asset objects in Automation for Jira. You can use the Lookup Asset (Insight) object with ScriptRunner action to retrieve an Assets object from any object schema. Once you have added the Lookup Asset (Insight) object with ScriptRunner action, you can then reference the attributes of the Assets object in another action using the {{lookupAsset}}smart value.
Using {{lookupAsset}} you can retrieve the attribute values, in addition to other important object values. For example:
{{lookupAsset.objectKey}}
{{lookupAsset.id}}
{{lookupAsset.attributes.Name}}
{{lookupAsset.objectType.name}} If you wish to discover more attributes, you can add Log action to a rule that contains the Lookup Asset (Insight) object with ScriptRunner action— {{lookupAsset}} must be added as the value in the Log action. Once the rule has run, you can check the audit log and it will display available attributes for you to use.
Retrieving object attributes using smart values is helpful in many contexts. For example, you can improve automated comments to include Assets object values to give users a more personalized experience.
Example: Personalize comments using asset object information
In the following example, we want users to receive a personalized message, as a comment, about their computer when they create an issue.
Computer, or equivalent.If you wish, you can improve your rule further by adding conditions. For example, you may want to add a condition to the rule so it does not execute if the Computer Assets custom field has no value.