Forums

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

Assets field display options depending on what is selected in another Aseets field

Albert Manuel
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.
August 8, 2023

Hi Guys,

Quick question: I have created an Aseets Object Schema that contains two Object Types categories - each having some options.

Now i have created tow custom fields where i have pointed each custom field to an Object Type so i can have my options in them - now how can i display only some options in the second Assets field, based on my selection in the first field?

Thanks

2 answers

1 accepted

2 votes
Answer accepted
Rudy Holtkamp
Community Champion
August 8, 2023

Hi @Albert Manuel ,

You have created two Asset fields:

  • Field1 (customfield_10119)
  • Field2 (customfield_10120)

In the 'Context and default value' settings on the custom field configuration page, you can set Field1 to:

Object schema: CMDB

Filter scope (AQL): objecttype = Organization

Filter issue scope (AQL): None

Allow search filtering by these attributes: Label

Object attributes to display on issue view: None

Field can store multiple objects: No

Display a default object when this field appears in a customer portal: No

Where Organization is the object type you want to show in Field1.

 

In the settings of Field2 you can use the following settings;

Object schema: CMDB

Filter scope (AQL): ObjectType="Department"

Filter issue scope (AQL): Organization = ${customfield_10119.label}

Allow search filtering by these attributes: Label

Object attributes to display on issue view: None

Field can store multiple objects: Yes

Display a default object when this field appears in a customer portal: No

So the key is in 'Filter issue scope (AQL)'

Here you refer to the customfield_10119 (Field1).

 

I hope this helps.

Albert Manuel
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.
August 8, 2023

@Rudy Holtkampthanks for your input - being new to the Assets part - I'm struggling a bit, so i'm gonna give you my exact configuration; maybe you can enlight me:

 

Object Schema: CMDB

Here i have 2 Object Types - Source 1 and Source 2. Each of these sources has like 10 options...

I have created 2 custom fields (Assets Type in Jira), and i have something like this:

Field 1:

Object schema: CMDB

Filter scope (AQL): ObjectType="Source1"

Filter issue scope (AQL): None

Allow search filtering by these attributes: Label

Object attributes to display on issue view: None

Field can store multiple objects: No

Display a default object when this field appears in a customer portal: No

-------

Field 2:

Object schema: CMDB

Filter scope (AQL): ObjectType="Source2"

Filter issue scope (AQL):

Allow search filtering by these attributes: Label

Object attributes to display on issue view: None

Field can store multiple objects: Yes

Display a default object when this field appears in a customer portal: No

 

So from those 10 options in the field 1 - i need to display only some of the options (based on selection) in Field 2. So if my source in field 1 is Hacking - i need to display only the options Spam, Phishing, Bruteforce. But if i select Intrusion as an option i need to display options like Online and Offline.

Thanks alot.

Rudy Holtkamp
Community Champion
August 8, 2023

image.png

Make sure you have linked the assets as above.

Then use for Source2: filter issue scope (AQL): 

object having inR(label = ${customfield_10119.label})
Like # people like this
Albert Manuel
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.
August 8, 2023

@Rudy Holtkampyou're a life saver ! Accepted Answer

Like Rudy Holtkamp likes this
0 votes
Kay March 6, 2025

Hi @Rudy Holtkamp ,

 

I have a similar question. In my case, I am mapping affected services to components. I tried the query given above but it did not work. Could it be that my schema mapping is wrong. Here is my schema and the mapping, can you assist with this please?

I have the components depending on the correlating affected service. I have 5 main affected service and 15 components depending on the affected service.

I want the user to only see the associated component for an affected service (selected in the first field)Screenshot 2025-03-06 at 9.30.55 AM.pngScreenshot 2025-03-06 at 9.31.03 AM.pngScreenshot 2025-03-06 at 9.32.52 AM.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events