How to use jql to find currentUser() in user group?

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 1, 2019

Hello,

I need to configure a Service Desk queue to only pull issues that have been assigned to a user group that the logged in user is a part of. Currently, I have a custom field (Assigned To Group) that contains the user group that the issue is assigned to.

How can I accomplish this through JQL? If this isn't possible with standard functionality, what would I need to accomplish this?

 

Thanks!

6 answers

1 accepted

1 vote
Answer accepted
Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2019

I was able to overcome this by using the Groups and Organizations in JQL add on. Thanks all for the dialog!

Malka
Contributor
October 24, 2019

Perfect... just about what I was looking for... unfortunately not for Cloud. *sigh*

4 votes
Keith Rowe
Contributor
March 27, 2020

Jira Cloud - With Jira Service Desk

JQL to find the current user in the Request Participants field:

"Request participants" in (currentUser())

The "Request participants" is a custom locked field added by the Jira cloud.

Full example to pull waiting for support status, or work in progress:

project = JIRAKEY AND status in ("Waiting for support", "Work in progress") AND "Request participants" in (currentUser()) ORDER BY created DESC
Dmitry Astapkovich _Colined_
Atlassian Partner
June 5, 2020

Let me thank you SOOOO MUCH! =) That works just perfect as a quick filter for the Collaborators custom field I've just added to our Board. A-W-E-S-O-M-E! 

Like Keith Rowe likes this
1 vote
Cengiz Akyildiz June 2, 2019

Have you tried jql like,

assignee in membersOf("<jira group name>")

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2019

I need to check the currentUser not the assignee unfortunately

Cengiz Akyildiz June 2, 2019

I haven't tried but you can have a calculated/scripted field for currentUser, then you can use above jql function. Well, I don't know, if you would go for this solution.

scripted_field in membersOf("<jira group name>"), you would need add-on for scripted field.

Another solution, you can have one queue for each bucket, so everyone can see how many tickets are there in each bucket. Well, as the number of groups grow, the solution might not be sustainable, but in some cases it works, if you don't use any add-on.

There's one more solution, you can use Queues for Jira Service Desk add-on, set up queues exactly in the same way as the second solution, by using queue restrictions, you can limit the user to see only the queue he is in. 

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2019

I'll look into the add on, thanks! I wish I could set up multiple queues but yes that wouldn't be scalable unfortunately.

Sascha Stegmüller June 7, 2024

Helped for me! Thanks!

0 votes
David Harkins
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.
June 8, 2024

We now have this working with the use of ScriptRunner, as Groups and Organizations in JQL is being phased out for a Paid Version.

0 votes
Sandra Axelsdottir
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 10, 2020

@Sam Nadarajan - Did you solve this? I need the same JQL 

David Harkins
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.
July 5, 2021

@Sam Nadarajan I'm also in need of the same.

Have an 'Assignee Group' field - Single Group

Need to show issues for which the current user is a member of the Single Group selected in the 'Assignee Group' field.

The 'Request Participants' is not going to work for my use case here.

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 6, 2021

Hey! I used the Groups and Organizations for JQL add-on, however that's only available for Server/Data Center. Are you using cloud?

Like David Harkins likes this
David Harkins
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.
July 6, 2021

@Sam Nadarajan Thank you for confirming.

Yes I used the same add-on on a Data Center install.

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2019

If I understand I would try this

Assignee in membersof (xxxx) and assignee = currentuser()

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2019

I wish i could use the assignee but unfortunately tickets get assigned to a group first. This is kind of the holding tank for tickets before they're picked up by individuals.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2019

How are you assigning to a group? I’m guessing you are using an email that maybe is a distribution list or something. Assigning issues to a group is rather flawed.

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 2, 2019

Yea I understand Atlassian's insistence on assigning issues to users only - scenario here is that different areas solve different types of problems which are triaged by the "call center" if you will. I set up user groups in Jira and a custom single pick user group field. Incoming tickets are assigned to different groups, and users in that group would assign it to themselves.

Andreas Lärkfeldt
Contributor
October 1, 2020

Samuel - Any findings??? Need the same! +1

Damian Ryan
Contributor
November 3, 2020

See comment by Keith Rowe above:

AND "Request participants" in (currentUser()) ORDER BY created DESC

Add that to your JQL string and it will show the current user (ie: you when you look) tickets of which they're a Requested Participant.

Suggest an answer

Log in or Sign up to answer