Insight custom field : How to restrict Visibility to current User

Amine Filali November 22, 2018

Hi,

I'm using Insight (5.7.3) and I have defined an Object Type (let's say "Type Alpha") with objects "Object 1", "Object 2" ... etc.

One of the attributes of object type "Type Alpha" is of type "Group" named "Authorized Groups" with cardinality unlimited.  

Let's say that

  • "Object 1" has "jira-group1" in the field "Authorized Groups". 
  • "Object 2" has "jira-group2" in the field "Authorized Groups". 

I have also defined a custom field mapped to the right schema and to the defined object type "Type Alpha". This custom field is used in Jira Service Desk. 

What I want to do is that if a client named "CLIENT1" belonging to a jira group named "jira-group1" wants to create a request from Jira Service Desk Portal, the custom field must only display "Object1", which means display only objects having at least one group to whom the current user is belonging. 

What I tried is the to add the following IQL in "Filter Issue Scope (IQL)" of the custom field :

"Authorized Groups" having user("currentUser()")

But it dit not work ! 

I also went to the schema view and tried the same IQL in the object type but it didn't work too (aka no objects we displayed) 

Do you have any idea how to achieve what I want?

thank you

2 answers

1 accepted

0 votes
Answer accepted
Yinon Negev
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.
November 23, 2018

Hi Amine.

     The IQL you indicated is the correct way to go, however, we have found a Bug in Insight 5.7.3 (logged here ) where the function HAVING user() does not work as it should.

Our Developers are currently working to fix this Issue, which I hope will be resolved in our next release (we cannot indicate an ETA at the moment though, but it shouldn't be long).

The Workaround in the meantime, is to downgrade to Insight 5.7.2 (you can download the OBR here).

As you've also created a ticket in our Service desk, please feel free to comment, if you require additional information.

Kind regards,

Yinon

Team Riada

1 vote
Yinon Negev
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.
November 26, 2018

Hi.

        We have just released Insight 5.7.4 - Maintenance release, where the said Bug was fixed.

Kind regards,

Yinon

Team Riada

Suggest an answer

Log in or Sign up to answer