Automation rule fails to create issue due to an Assets custom field validation error
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
During a new issue creation within an automation rule, the Create issue event fails with the error Validation failed for Insight object (customfield_12345).
Diagnosis
This behavior has been seen with various triggers and primarily to impact the Create issue action. During the automation issue creation event, the Assets custom field is attempted to be populated using an AQL query, however, editing the field fails due to a validation error resulting in the overall event to fail.
The audit log entry returns a Some Errors status. The error seen in the automation audit logs:
Error creating issue
Validation failed for Insight object (customfield_12345)
Cause
The issue occurs due to a mismatch error when multiple Assets Objects are returned on the AQL used to set the field value. When the Assets custom field has Schema filtering configured and the automation rule tries to set the value to an Object that does not match the filter, a validation error occurs.
Solution
Adding further filtering to the AQL query that the automation rule is executing resolves the issue as it filters out those Objects that would not validate against the Assets custom field.
An example may be to add filtering for objectSchema, objectSchemaId, objectType, or objectTypeId.
Please read the support article Set up the Assets objects custom field for further information on configuring Assets custom fields and Using Assets Query Language (AQL) syntax for examples and details on the AQL syntax.
Was this helpful?