Filter Jira Assets Field Using Multiple Object References in Jira Cloud

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Filter objects in an Assets field based on another Assets field's selection using AQL. Learn how to configure this when multiple objects are stored.

If you're looking for this configuration in Assets Data Center products please follow this article instead: JSM Data Center - Assets - How to configure Assets Object custom field based on another Assets Object custom field

Solution

Filter Assets Using AQL Based on Multi-Object Fields

Imagine you have a custom field called "Servers" that retrieves multiple items from a category named "Server". Another custom field, 'Impacted Services,' retrieves items from the 'Services' category. The "Server" category includes an attribute called 'Provided Services,' which links to the 'Services' category.

When you select Server A and Server B objects in the custom field "Servers," the "Impacted Services" field should only show the Services objects referenced by these two servers, service1 and service2.

  1. Configure the Servers custom field:

    1. Object schema: ITSM

    2. Filter scope (AQL): Objecttype = Server

    3. Filter issue scope (AQL): None

    4. Field can store multiple objects: Yes

  2. Configure the Impacted Services custom field with the following Filter issue scope, where 10127 is the custom field ID of the Servers field:

    1. Object schema: Services

    2. Filter scope (AQL): objecttype = Service

    3. Filter issue scope (AQL): object HAVING inboundReferences(objecttype = Server AND objectId IN (${customfield_10127${0}}))

Additional tip

When using another Assets object custom filed in Filter issue scope AQL:

  • ${customfield_xxxxx} retruns the Object id and can be used in Filter issue scope AQL as "objectId =  ${customfield_xxxxx}"

  • If the field holds multiple values, the placeholder can return a single value by using an index "(${customfield_xxxxx${1}})" or it can return all of the values at once by using a query like "objectId IN (${customfield_xxxxx${0}})"

  • ${customfield_xxxxx.label} returns the value stored in the object label and can be used in Filter issue scope AQL as "objecttype = Server AND Name =  ${customfield_xxxxx.label}"

  • ${customfield_xxxxx.label${0}} returns all the values stored in the object label and can be used in Filter issue scope AQL  as "objecttype = Server AND Name IN (${customfield_xxxxx.label${0}})"

 Also, please take note of this bug that might affect the way you browse for the objects JSDCLOUD-10496.

Reach out to Atlassian support for additional questions https://support.atlassian.com/contact/

Updated on May 6, 2025

Still need help?

The Atlassian Community is here for you.