Forums

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

Insight - Issue with filtering issue scope by group membership of the current user

Flavien Gache
Community Champion
March 25, 2022

Hi everybody.

I am having a hard time finding the correct IQL query to solve my problem.

My client works with a JSM project where customers can open requests on different locations. For example, a client working in New York belongs to the New_York_GRP, a client working in Tulsa belongs to the Tulsa_GRP

Now, he would like to offer customers the possibility to choose their PC from a list depending on their location. For example, a Tulsa worker could only choose PC located on Tulsa site.

I created a CMDB with the following objects :

- Location (with a Group attribute to locate the asset)

- PC (with the Location attribute to link a PC to a location)

 

I created an Insight custom field but I am having big troubles to filter the issue scope with IQL. 

How can I tell this field to only display PC whose Location matches the user location ?

I know I should use something along the lines :

object having inboundR (currentuser in membersof Group()) 

object HAVING inR("Group" HAVING user(currentUser()),"Link")

But I am not able to make it work.

Thanks in advance for your help ! 

1 answer

1 vote
Arkadiusz Baka
Contributor
March 25, 2022

Assuming that Group attribute in objecttype Location is called "LocGroup", It will be somthing like that:

objects HAVING outR(LocGroup having user("currentUser()") and objectType = "Location") and objectType = PC

Suggest an answer

Log in or Sign up to answer