Hi everyone,
I am configuring a Custom Field in Jira Service Management (Data Center) powered by Assets (Insight). I have a simple Object Type with an attribute named GruppiAbilitati.
Attribute Name: GruppiAbilitati
Type: User/Group (Configured to hold Jira Groups, not Users).
The Goal: I want to filter the objects in the "Filter Issue Scope" so that the user sees only the objects where the GruppiAbilitati attribute contains a group that the Current Logged-in User belongs to.
Current Status:
If I use the Reporter, this works perfectly:
"GruppiAbilitati" HAVING user(${reporter})If I try to use the Current User, I get a syntax error:
"GruppiAbilitati" HAVING user(currentUser())Error: extraneous input '(' expecting {')', ',', ' '}. It seems the parser does not accept a function inside the user() function.
My Question: What is the correct AQL syntax to check if the Current User is a member of the group(s) listed in the GruppiAbilitati attribute?
I have tried "GruppiAbilitati" IN connectedUserGroups() but I am not sure if this is the correct way to match a "Group" attribute against the user's group list.
Any suggestions for currentUser() group filtering on a direct Group attribute?
Thanks!
welcome to the community and thank you for your question. According to the documentation Marc provide you have a syntax error. It should be:
"GruppiAbilitati" having user("currentReporter()")
Let me know if this helps.
Hi @Kai Becker
The doc also states, this can only be done if the attribute is of type user, it can't be done if the attribute type is group.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kai Becker
The solution worked using "GruppiAbilitati" HAVING user("currentUser()").
Thank you very much
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marc -Devoteam- there are two versions:
The first one needs a user object, the second a group:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the community.
You can only use the currentUser() with a user attribute, not a group attribute
Also see https://support.atlassian.com/assets/docs/use-assets-query-language-aql/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.