Automate Attribute Updates in JSM Cloud Assets
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Use Automation rules to update object attributes when an object is created or updated. The examples show how to calculate license counts, calculate a warranty end date, and find the difference between an object date field and today.
Solution
Example 1: Calculate the Used and Available License count
From the Global admin page of automation, create a rule that triggers when an object is created or updated.
Add the Edit object action.
Update the attributes as follows:
AttributeSmart value
Used
{{object.Assigned.size}}Available
{{#=}}{{object.Total}} - {{object.Assigned.size}}{{/}}
License objects use the Assigned user attribute and the Total, Used, and Available number attributes.
Example 2: Calculate the end of the Warranty date
From the Global admin page of automation, create a rule that triggers when an object is created or updated.
Add an action to create a variable named
datevarwith{{object.Warranty startDate}}.Add an action to create a variable named
monthswith{{object.Warranty}}.Add the Edit object action and update the Warranty endDate attribute with
{{datevar.toDate.plusMonths(months.asNumber)}}.
Warranty objects use the Warranty Start Date, Warranty End Date, and Warranty attributes.
Additional use cases
Was this helpful?