We have a custom field (in this example - "Related Control") which is configured to link to a Jira Assets object, but would like to set the value in certain automations.
For example, suppose we have a Request type which always relates to a Cryptography control, we would like to set this automatically when a request is raised.
The field works fine when setting manually - it is configured to link to a particular schema, and when manually editing a ticket it is possible to select multiple values, as expected.
When using automation, I can retrieve the attributes of Assets objects using AQL, and use these in further automation, but I am unable to set the custom field to the Assets object.
When using the "Edit Issue Fields" action, selecting the "Related Control" field in my example prompts for AQL:
When clicking on "Validate Syntax", the following pop-up appears, regardless of the AQL entered:
I have tested using multiple AQL queries, but get the same error. I am, however able to retrieve the object values using the same AQL in a "Lookup Objects" action.
I have checked the custom field configuration, and I am searching on attributes which are searchable
Has anyone else experienced this issue, or have any suggestions of another method to automate the population of the custom field with the appropriate Assets object.
The validate function has a bug Assets Automation: Validate Syntax for Object Attributes in Automation is failing
If the AQL in a "Lookup Objects" action works fine, it can be used in Edit Issue action without validation.
Sorry for the delay in marking this query as resolved. There were a couple of contributory issues.
Firstly, as @*ServiceRocket* KL Foong states, the "Validate Syntax" option doesn't work in this scenarion, however the AQL works fine and returns objects which can then be used for further automation.
Secondly, when I initially had issues, I was attempting to search on an attribute which wasn't searchable in the custom field configuration. Making the attribute searchable fixes that issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Heya @Scott Bickerton and anyone that's stumbling across this.
TLDR; I think you're looking for the keyword 'Key'. The Lookup Object action returns the object key (eg. ABC-1111}. So when creating/editing an issue with assets as a custom field, you're looking to do:
key = {{lookupObjects}}
I ran into this issue just today. My use case was that I needed to create new issues every week for each asset with objectType = "Office".
eg. Name = Office Sydney
Abbreviation = SYD
To test, I used Lookup Object action and AQL to find the object: objectType = Office and "Name" = "Office Sydney". This gave me PRP-123, and I was able to do {{lookupObject.Abbreviation}} to get SYD.
In my Create Issue action, I selected the assets custom field "Office". For the AQL, I used key = {{lookupObjects}} and it linked the issue to the object.
I hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.