The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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?

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Dan Knapton
Contributor
October 7, 2025

@Scott Boisvert  Did you figure this out?  I am having the same issue.

Scott Boisvert
Contributor
October 7, 2025

@Dan Knapton Nope, never figured it out. Worked with Atlassian on it for a while and they couldn't figure it out either. Seems like a bug to me, but with DC end of life announced, I doubt they will fix it.

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 Kumar Gangwar
Community Champion
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 Kumar Gangwar Yep, tried that too... No luck returns the same set of issues.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.