Find Issues Assigned to Users in Same Group As CurrentUser

Dalectric
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 25, 2014

Hi

We have some teams with a team leader and the leader wants to be able to monitor the status of their team's tasks.

Obviously we can filter these issues by assignee in membersOf("TeamA")

However there are at least 6 groups, so this means there are 6 versions of the filter. We have several filters so this quickly becomes a lot of filters.

Ideally I'd like to create a generic filter that finds assignee in membersOf(Group That CurrentUser() Is A Member Of). Then each team leader can look at the same filter, but it will give results for their team.

Is there a way of doing this?

1 answer

2 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2014

Not really.  This keeps coming up, and the answer is "think it through carefully, and re-assess how you do all your groups".

The problem here is (group that currentuser is a member of) will always evaluate to a list of groups, very rarely just one group.  One of those groups will be the "can log in" group.  Which will make the expression "assignee in membersOf(Group That CurrentUser() Is A Member Of)" always come out as "EVERYONE who can currently use the system".

Now, you can start to break this down - create group A, B and C, and put all three groups into the "can log in" permission, removing the standard jira-users "can log in group".  But as you add new members to JIRA, you'll have to remember to remove them from A, B and/or C as appropriate for EVERY new member.

I'm afraid the only useful way to approach this really is to stick to membersOf(TeamA) 

Dalectric
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 25, 2014

Thanks, I'd probably also add another qualifier that checks the name of the group (So I'd have to name the groups carefully too) and stop it pulling everyone up. I have the JQL Tricks plugin so can use a regular expression on the group name; http://www.j-tricks.com/jqlt-group-functions.html But anyway, I think ultimately we'll have to stick with named groups and multiple filters if there's no easy way to find the groups for the current user.

Sinan Yesilyurt
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.
August 21, 2016

Hi Dalectric,

Please write syntax. I try link regex but not working.

I need same scenario.

Thank you

Dalectric
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.
August 22, 2016

I can't find a direct example but this is some regex we are using

fixversion in versionMatches('SWName.*')
Miguel Costa January 16, 2017

i think creating the concept of team should not be so hard, specially this can be managed by external tools and just get it from the LDAP or whatever user management system you have.

 

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 17, 2017

The problem is not grouping the users into teams, the problem is deciding which team you are interested in when people belong to many of them (including the "can use JIRA" team)

Suggest an answer

Log in or Sign up to answer