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?
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.
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot