Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

AQL to fetch all objects of a certain type from a schema that are missing a child

Petru Simion _Simitech Ltd__
Atlassian Partner
May 29, 2025

I have to define a custom field of type Assets Object, that will fetch all objects in a schema that have no children.

The schema defined object type Alpha that have children objects of type Beta and Gamma.

Sometimes the Gamma child was detached from the relationship.

I want the custom field of type Asset Objects to fetch all the Alpha type objects that are missing the Gamma child. I need to write thet AQL for that. Is it possible?

2 answers

1 accepted

0 votes
Answer accepted
Petru Simion _Simitech Ltd__
Atlassian Partner
June 28, 2025

I found the solution myself it is using 

object NOT having inR(objectType = "[OBJECT TYPE]")

0 votes
Pablo Vergara
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2025

Hi @Petru Simion _Simitech Ltd__ 

Refer to the Employees (Alpha), Non-contractor (Beta), and Contractor (Gamma) attached schema and example.

As you can see, you can filter those Alpha objects having no Gamma child objects linked up and present them in a custom asset field using AQL within the field config.

I hope this example helps you!

1.png2.png3.png

Just in case you're wondering what the link configuration is:

4.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events