Forums

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

How to filter an Asset object custom field using Filter issue scope based on issue field thats EMPTY

Patrick Smith March 20, 2025

I have successfully done the whole "cascading selection" with Asset object custom fields using the Filter issues scope. This is great, when the primary issue field has been populated so that the second issue field can filter based on that. However I would like for the second issue field to still show every object it can if the first issue field hasn't been populated yet. Basically, I don't want the second issue field to be dependent on the first issue field, but only helped by it, if it's populated.

 

Specifically, the behavior I want is:

1. Asset object issue field called "Area" exists on issue but is empty

2. Asset object issue field called "Building" exists on issue and shows all available objects, as if it's Filter issue scope was empty.

3. I populate the "Area" field on the issue

4. The "Building" field on the issue now shows filtered objects that have the same Area attribute value (object) as the one selected in step 3

Note that the Building objects will have an "Area" attribute linked to an "Area" object, same as the issue in the primary field (customfield_10315)

2025-03-20 12_31_56-Configure Custom Field_ Building - ITSM — Mozilla Firefox.png

 

I wasn't expecting is not EMPTY and is EMPTY to work in AQL since I couldn't find any documentation on it. The AQL validator says the code is ok, however when I check the issue, the "Building" field is not showing any objects at all now

 

Also, I know that the objectType = objectTypeAndChildren("Structures") part in the Filter issue scope section is repetitive, I was just trying to give it something to validate against in case that was required. I've also removed it and left just ${customfield_10315} is EMPTY on the right side of the OR and it still isn't working

 

I've also tried using an IF statement but couldn't get that to work either.

 

I'm open to any ideas\suggestions

2 answers

1 vote
Gupta Vishal
Contributor
April 14, 2025

Hi @Patrick Smith

 

Welcome to the Atlassian Community!

 

I understand that you want the "Building" Asset custom field to display values based on the "Area"  Asset custom field on the JSM portal, even when the "Area" custom field is empty. To achieve this, you can use AQL under the "Filter Issue" scope with a query similar to the following:

 

"Area" LIKE ${customfield_10315.label}

 

If you have any further questions, please let me know!

 

Thanks & Regards,

Vishal Gupta

Ziad Bakhiet April 15, 2025

Thank you so much @PgUp 

This worked for me :)

Like Gupta Vishal likes this
0 votes
Ziad Bakhiet April 14, 2025

Hello @Patrick Smith 

Did you find any solution or workaround for this ?

Thank you :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events