Forums

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

Cascading Asset Fields: Issue Displaying Related "Degree" Objects Based on Selected "University"

Francisco Torrecillas Sabater September 24, 2024

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:

  • 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:

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:

  • 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:

  • 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!

1 answer

1 accepted

1 vote
Answer accepted
Francisco Torrecillas Sabater September 24, 2024

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.

Suggest an answer

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

Atlassian Community Events