Add an Assets object URL to a Jira work item with Automation
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
When configuring automation in Jira Service Management, you may use different types of triggers, such as scheduled/manual triggers or object created/updated triggers. Depending on the scenario, the appropriate smart values can be utilized to reference JSM Assets Objects. Below are the recommended approaches for each trigger type.
Solution
Scheduled, Manual, or Other Triggers
For scheduled, manual, or similar triggers, you can use the Lookup Objects action with an AQL (Assets Query Language) statement to retrieve the desired object. The object's ID can then be accessed using the Smart Value: {{lookupObjects.id}}
Note: The smart value lookupObjects.key returns the object key (e.g., ABC-127), where 127 is the object's unique ID.
Object Created/Updated Trigger
When using an Object Created or Object Updated trigger, the object's ID can be accessed directly with the Smart Value: {{object.id}}
Construct the Object URL
To generate a direct URL to the asset object, you can use the object key (e.g., ABC-127). Store this value in a variable and incorporate it into the URL as shown below. Replace <sitename> with your Atlassian cloud site name and <objectKey> with the relevant smart value or variable.
https://<sitename>.atlassian.net/jira/servicedesk/assets/object/<objectKey>Examples
Using the lookup object ID:
https://<sitename>.atlassian.net/jira/servicedesk/assets/object/{{lookupObjects.id}}Using a stored variable:
https://<sitename>.atlassian.net/jira/servicedesk/assets/object/{{variableName}}
You can include these URLs in the issue description or within email notifications as needed.
Was this helpful?