Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Using Cascading Fields with Forms and Assets

This workaround is meant to help users that want to use cascading fields with forms or use a 3+ level cascading custom field type.

So this is an option of the workaround from the features below:

And is meant to help projects where it is necessary to use multiple select options in a field, I used Jira Forms with Assets. In addition, I used as an example a form with the "Country" field in which, depending on the selected country, will open options related to "State" and "City" (all following the selection of each one). This method can be used for other purposes (eg. general and administrative costs).

Important related documentation:


Create or edit a form

Set up the Assets objects custom field

 

Workaround steps:

  • Create Assets objects schemas

    • Create object schemas for each item that will be used, as well as for each option that will be used on the cascading logic, for my example I used: Countries, States and Cities.

    • It will need to link an object 'Country' to an object 'State' and to an object 'City' as an attribute:
    • Country:
    • Screenshot 2023-03-31 at 18.36.08.png
    • State:
    • Screenshot 2023-03-31 at 18.38.21.png
    • City
    • Screenshot 2023-03-31 at 18.39.17.png

 Remember to mark the option "Allow others to select objects from this schema". For more details about object schemas, please refer to Create an object schema

  • Create Assets objects custom fields

    • Create a custom field (assets) for each option that will be used in the cascading values, I created the field "Country", "State" and "City".

    • It will need to use the Filter issue scope (AQL) to reference the object custom field in the order of your cascading logic. In this example: Country > State > City

      Using the AQL:
      object HAVING inboundReferences(Name = ${customfield_XXXX.label})
    • Country field:
      Screenshot 2023-03-31 at 18.54.13.png
    • State field:Screenshot 2023-03-31 at 18.55.46.png
    • City field:Screenshot 2023-03-31 at 18.57.31.png

 Remember to mark the option "Display a default object when this field appears in a customer portal" to the refered field objects. For more details about object schemas, please refer to What is the Assets objects field?

  • Form Settings:

    • Create a form and add an Assets/object field and linked then to the Jira Assets object field:Screenshot 2023-03-31 at 19.09.05.png

This workaround will work as shown in the screen recording below:

12 comments

Bruna Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 31, 2023

Extremely useful! :D

Like Bruno Altenhofen likes this
Charles Trilha
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 31, 2023

Nice Article! ProForma Legend, Bruno!

Like Bruno Altenhofen likes this
Wagner Filho
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 31, 2023

Amazing article, Bruno! 

Like Bruno Altenhofen likes this
Tomislav Tobijas _Koios_
Solutions Partner
Solution Partners provide consulting, sales, and technical services on Atlassian products.
April 1, 2023

I've recently tested this at one of our client's environments and it worked pretty well. The only thing that didn't work is clearing out the second or third-level field when the first-level field is cleared or when the value is changed → we didn't configure the field so that the default value is displayed.

In general, it's a cool workaround, but it's only relevant if you have JSM Premium or Enterprise plan (so when you have an Assets feature available).

Anyway, really cool and useful article there 🙂

Like Bruno Altenhofen likes this
Bruno Altenhofen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 3, 2023

Hey @Tomislav Tobijas _Koios_ 

Thank you for your feedback! 🙂

Yes, unfortunately, it will always preselect a value that was linked to the Asset object custom field, but you can change it if you have other options, as I show in the screen recording.

Cheers,

Prathiksha
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 3, 2023

This one is super helpful! :D

Like Bruno Altenhofen likes this
Apurbo Mandal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2023

Perfect learned a lot.

Like Bruno Altenhofen likes this
chaitanaya d
Contributor
May 14, 2023

Hi sir could make it more details on Cascading fields

with below Example: 2 cascading fields

                                   Profession(parent value)

 

Private Sector(child value)                  Government Sector(child value)

  1. Software engineer                            1.police officer
  2. Mechanic                                          2.Govenment Officer
  3. Doctor
Adam Gołaszewski
Contributor
July 7, 2023

I found a bug that it only displays a Label attribute even if you select more attributes in the Allow search filtering by these attributes in the field context configuration. As per below screenshot even though i have three attributes selected i only get the one that is a label attribute. Not sure if this is raised in Atlassian yet.

image.png

Tyler Kosaski
Contributor
August 23, 2023

How would I configure AQL of the asset attributes of state and country to enforce this cascading when entering objects in Assets as well?

For example what if there was another object schema containing people where I wanted to track their location.

Like J Conners likes this
Beau Spree June 20, 2024

Hi @Bruno Altenhofen - 

Am I right in thinking that we can only have 20 items per drop down?

"The Assets object custom field can be configured to store up to a maximum of 20 objects." - I found this on setting up the asset custom field article. 

Please let me know if I am wrong?


Thank you

Matthew Challenger
Contributor
July 3, 2024

This is great! Always such insightful articles from you, @Bruno Altenhofen. Thank you!

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events