JQL Search query: Issues that have been assigned to users not part of specific group

Sonny de Wit November 19, 2012

Hi,

I've been unsuccessfully trying to find a way to run a search for issues that have at some point been assigned to any user that is not part of a specific group. This seemed simple enough, but I have not yet found a way to do this.

1.: Search for issues that were at some point assigned to a user not part of group x. Query: assignee was not in membersOf(x)

Problem: Returns only issues that have never been assigned to anyone in group x. I require all issues that were at some point not assigned to anyone in group x. (preferably barring unassigned, but this can be worked around)

2.: Okay, let's then reverse this instead and search for: issues that were never assigned to anyone not part of group x.

Problem: Query does not seem to exist! Something like "assignee was not outside membersOf(x)" would be necessary, but the inverse of a group is not something I have found a syntax for.

I can think of workarounds in the form of manually changing the status of every past/present/future issue or adding every single JIRA user not part of group x to a group "not x". However, I consider the former an unwanted burden on workflows and unwanted addition to the system, and the latter is/will eventually produce a big administrative mess.

Any options?

Kind regards,

Sonny

2 answers

0 votes
idiyana April 28, 2019

i have a similar scenario like you. my work around was, i created a group let say GroupB and added all users except users from the specific group (GroupA). in the jql i used a function assignee was in membersOfGroups("GroupB") and i managed to get the result i wanted.

0 votes
Carsten A.
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 19, 2012

I guess that's not possible. The only way which comes into my mind is to write a plugin with a new jql clause for that (maybe there is already a plugin for that?): https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Adding+a+JQL+Function+to+JIRA

Sorry I cannot help you any further. :-(

Carsten A.
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.
December 1, 2012

Any progress on that?
(Please tell people with similar issues if your issue could be solved.)

Sonny de Wit December 2, 2012

No progress here, unfortunately. Getting someone to look into writing a plugin as you suggested (thanks for the feedback!) might be something I will have to look into at in the near future but do not have the resources for at this moment.

As for similar questions/plugins: Possibly this post will provide some leads on creating a plugin that allows searching for users not part of a specific group: https://answers.atlassian.com/questions/81598/script-runner-get-users-not-in-jira-users-group

However if this search really is not possible at the moment (besides plugins) I do wonder if either or both search options shouldn't/couldn't be implemented in JIRA itself. Especially not having a way to search for "users not member of group x" seems like a simple little gap in the available search functionality.

If I find a way, I will add it to this issue.

Suggest an answer

Log in or Sign up to answer