How to copy from/to Asset field value to/from Jira text custom field using automation for Assets

Still need help?

The Atlassian Community is here for you.

Ask the community

 

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

  

Summary

Copy the value of an Assets Object field to/from a Jira text field using the Automation rule.

Environment

Jira Service Management Cloud

Solution

To achieve it, we need to use the Edit Issue action in the automation rule. 

For example: Say the Assets object field that stores the Assets objects is called Test-Assets then use the Edit action to populate the text custom field called Custom B. Refer to the smart value to update the text field using the Assets attribute (say: Name) of Test-Assets in the Edit Issue action:

{{Test-Assets.Name}}

Similarly, to update the Assets field using the Jira text field, you need to use Assets Query Language (AQL) to populate the object in the Assets field. For example, if we need to populate the Assets field "Affected Certificate" from the text field "Test-labels", AQL required would be as below:

objecttype= Certificates AND Name Like {{issue.Test-labels}}



And, to update multiple objects in the Assets field, refer to AQL syntax in the Edit issue action to edit the Assets object field:

objecttype= <object-name> AND "<attribute-Name>" in ({{<issue.field.Name>}})

Last modified on Jan 29, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.