Hello,
I am trying to update our decommission user automation to look up asset objects where the user being decommissioned is referenced, then adding the name of the asset they are being referenced in a subtask. On the issue, the Affected user custom field is updated with the user being decommissioned (linked to Employee_Data objects in Assets). The rule will check if the Affected User is listed in certain attributes in assets, then create a subtask. If it doesn't exist, the subtask is not created.
Our Schemas in Assets are structured as:
Here is a sample of the rule:
{{#debug}}objectType = "Vendors" AND "Current Status" IN "Active" AND "Relationship Manager" IN "{{issue.Affected User.Name}}"{{/}}
I am getting an "Assets field condition failed" error in the AQL Condition. I am not sure what I am doing wrong and have tried many different AQL queries. Any insight or recommendations pointing me in the right direction would be greatly appreciated.
Hi @Andy Thelen -- Welcome to the Atlassian Community!
Disclaimer: I am not currently using Assets or AQL, and so cannot test my suggestions. With that out of the way...
I believe there should be parentheses surrounding the values when using the IN operator:
{{#debug}}objectType = "Vendors" AND "Current Status" IN ("Active") AND "Relationship Manager" IN ("{{issue.Affected User.Name}}"){{/}}
Kind regards,
Bill
Hi @Bill Sheboy
Thank you for the response. Adding in the parentheses unfortunately did not produce any results.
I try the Advanced AQL editor in Assets with and with out the parentheses and still would produce the results I expect, but for some reason is not working in the automation rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Again, I am guessing here...
If you expand the branch area in the audit log to look at the issue keys, is the one you show with that standalone AQL query the same for the specific Affected User field: VEND-14390? Or did it not match for the specific issue the rule branched over?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From the audit log screenshot I posted before, the branch rule was fully expanded so I can't see the keys. The branch trigger is set for the current issue, which is where the Affected User field is set. It looks like the condition did not find the match, but it should find VEND-14390.
Some information I left out was that each object type is in a different schema. Affected User is in the Accounts Schema (Employee_Data Object Type), while the Vendor Object Type is in the Vendor Schema. I thought defining the object schema in the AQL condition would help but that also didn't work.
I do have another branch in the automation that uses the same Affected User field to look up attributes in the Accounts schema. That is working. The problem seems to be when trying to query in a different schema.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I am out of ideas to suggest for this one.
You could wait to see if another community member has suggestions or work with your Site Admin to submit a ticket to Atlassian Support to ask them:
https://support.atlassian.com/contact/#/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.