Using aqlFunction in JQL for Multi Select Assets Field

Scott Boisvert
Contributor
October 9, 2024

I have an Assets select field called Facilities, this field is configured to select multiple asset objects. I'm looking to write a JQL statement that will return the issue if the Assets field contains at least one Facility object where the Name = "XXXXXX"

Here is the JQL that I came up with that half works. This will bring back issues if there is only one Facility selected, if there are multiple those are not returned.

 

project = FACSD AND "Customer Request Type" = "Business Meal Request" AND Facilities in aqlFunction("Site.Name = \"XXXXXX\"")

Assets Search.png

For example this issue is not included and should be:

Assets Search 2.png

How should I update my JQL/AQL to pull in issues that have multiple Facilities selected where at least one matches the AQL criteria?

2 answers

0 votes
julia_gracia
Contributor
October 10, 2024

Hi did you tried 

aqlFunction("Site.Name IN (\"XXXXXX\""))
Scott Boisvert
Contributor
October 10, 2024

@julia_gracia Yep.... Same results. (had to move the last quote outside the parenthesis (failed with it inside.

aqlFunction("Site.Name IN ( \"XXXXXXXX\")")

 

julia_gracia
Contributor
October 10, 2024

Could you try this

project = FACSD AND "Customer Request Type" = "Business Meal Request" AND Facilities is aqlFunction("Site.Name = \"XXXXXX\")")

 Change the Facilities in aqlFunction for Facilities is aqlFunction

Scott Boisvert
Contributor
October 10, 2024

@julia_gracia looks like the is operator isn't supported for Assets fields...

Assets Is.png

julia_gracia
Contributor
October 10, 2024

It dosen´t say that in the documentation 

https://support.atlassian.com/jira-service-management-cloud/docs/assets-jql-functions/

jajajaja just Atlassian 

Scott Boisvert
Contributor
October 10, 2024

@julia_gracia That would be the cloud documentation, we're on Data Center (doesn't mention "Is" in that documentation (thought it doesn't mention supported operators either): https://confluence.atlassian.com/servicemanagementserver/assets-jql-functions-1087513360.html 

0 votes
Manoj Gangwar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 9, 2024

Hi @Scott Boisvert could you please replace = to with Like function. Below is the example. 

"Site.Name LIKE 'XXXXXX'"

Scott Boisvert
Contributor
October 9, 2024

@Manoj Gangwar Yep, tried that too... No luck returns the same set of issues.

Suggest an answer

Log in or Sign up to answer