AQL that relates two objects using another object reference they have in common
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
In some cases, it is necessary to create an AQL that relates two objects using another object reference they have in common. E.g. Computers and Employees are from the same Cost Center.
Object Types:
Computer
- Attributes: Name, CC (Cost Center)
Employee
- Attributes: Name, CC (Cost Center)
Cost Center
- Attributes: Name
Solution
To list every Computer that has the same Cost Center as the Employee, you can use the inboundReferences function.
AQL
objectType = "Computer" and "CC"."Name" HAVING inboundReferences(ObjectType = Employee AND Name = "Alan Turing")
Last modified on Sep 15, 2023
Powered by Confluence and Scroll Viewport.



