Cascading Asset Fields: Issue Displaying Related "Degree" Objects Based on Selected "University"
Asked by Francisco Torrecillas Sabater:

**Details:**

Hi Atlassian Community,

I'm facing an issue while configuring cascading asset fields in Jira Service Management (Cloud Premium). My goal is to have two dropdown fields, "University" and "Degree," where the available degrees are filtered based on the selected university.

### Here's how I have it set up: {#toc-hId--2123658932}

* I created two object types in Assets:

  * **University** (with attributes like "Name" and "City")
  * **Degree** (with attributes like "Name," "Study Plan," "Duration," and a reference to the **University** object)
* I set up custom fields in Jira for both **University** (customfield_10203) and **Degree** (customfield_10204) and linked them to the respective object types in Assets.

* The **AQL** for **University** is simple:  
  `objectType = "University"`  
  This works correctly and shows the list of universities.

* The issue comes with the **Degree** field. I want to display only the degrees associated with the selected university. I tried using this AQL for the **Degree** field:  
  `- objectType = "Degree" AND "University" = $customfield_10203`  
  `- objectType = "Degree" AND "University" = customfield_10203`  
  `- objectType = "Degree" AND "University" = University`  
  `- objectType = "Degree" AND "University" = "{customfield_10203}"`  
  `- objectType = "Degree" AND "University" in $customfield_10203`  
  `- "University" = $customfield_10203`

*** ** * ** ***

### The problem: {#toc-hId-363853901}

When I select a university, the degrees do not filter based on the chosen university. However, if I use `objectType = "Degree"`, I get all the degrees listed without filtering, so I know the degrees are there.

### Things I've tried: {#toc-hId--1443600562}

* Ensured that **University** is correctly set as a reference in the **Degree** object.
* Confirmed that the custom field IDs (customfield_10203 for University) are correct.
* Tried using both **Reference** and **Dependency** as relationships between **University** and **Degree** in Assets.
* Rechecked the AQL syntax multiple times.

*** ** * ** ***

### Questions: {#toc-hId-1043912271}

* Is my AQL syntax correct for filtering degrees based on the selected university?
* Is there a specific step I might be missing when setting up the cascading fields?
* Could working in a pre-production environment affect the behavior of asset field filtering?

Any guidance or insights would be greatly appreciated!


Answers:
author: Francisco Torrecillas Sabater
body: Hi everyone!

I wanted to share that I've finally resolved the issue with the dependent dropdown for degrees based on the selected university.

The key was in configuring the AQL correctly in the custom fields for "Universities" and "Degrees." Here's what I did:

1. **In the "Degrees" field** (the dependent dropdown), under **Filter Scope (AQL)**, I set the following:

   `objectType = `"Titulaci?n"` `

   This ensures that only objects of type "Degree" are displayed in the field.
2. In **Issue Scope of the Filter (AQL)**, I added this condition:

   `Universidad = `${customfield_10203}` `

   This filter ensures that only the degrees related to the selected university in the "Universities" field (customfield_10203) are displayed in the "Degrees" dropdown.

With this setup, when I select a university in the first dropdown, only the corresponding degrees appear in the second dropdown.

If anyone is facing a similar issue, I hope this solution helps! Thanks again for all the support.


Tags: cloud

jira-service-management

jira-service-management-cloud