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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

541 views 1 18
Join discussion

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