Bulk Clone Assets Objects Across Schemas and Types in JSM Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
In Jira Service Management Assets, you can't move objects to a different object type, and the Clone action can create objects only in the same object type as the original. Use Automation to bulk-clone objects to a different object type or schema, instead of manually recreating each object.
Important Note on this Workaround:
The object key will not be the same on the cloned objects.
The asset object fields that store the original objects might need to be updated with the new objects.
You might need to create a new custom field for Assets objects or adjust an existing one to show the objects created by this process.
There is a limit of 50 objects per Assets automation run. Depending on how many objects to clone, you might need to run the rule multiple times.
Solution
Creating the ObjectType
Before creating the automation rule, make sure the target object type has all the attributes of the original object type.
For example, if OldObject has the Warranty and User attributes, add those same attributes to NewObject, in addition to the default attributes.
Creating the Automation Rule
Go to System (⚙) > Global Automation and start a new rule with these components:
Scheduled Trigger: Use the scheduled trigger to ensure the rule executes as needed. The schedule itself is not important for this workaround, but the rule may be triggered again depending on how it is configured. Disable the rule after using it, and enable it again when you need to use it in the future.
Branch on AQL: Select the schema where the objects reside. In the Query field, add an AQL query to narrow the results, such as
objecttype = OldObject. Add as many AQL statements as needed for your use case.Create Object: Select the target object schema and target object type where the objects will be created. Select every attribute that should be copied to the new objects, and use the
{{object.AttributeName}}smart value. ReplaceAttributeNamewith the actual attribute name from the old object.
Name the automation rule and publish it by clicking Turn it on. Then run it by clicking Run Rule.
Result
After clicking Run Rule, the objects should be copied to the selected target object type and schema. If more than 50 objects need to be cloned, run the rule multiple times.
Was this helpful?