Find Issues Assigned to Users in Same Group As CurrentUser

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

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) 

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.

Hi Dalectric,

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

I need same scenario.

Thank you

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

fixversion in versionMatches('SWName.*')

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.

 

 

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

101 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you