Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to select all users rolling up to a manager in Jira

Jira is great for running projects, but if you manage a team in a large organization, you'll eventually need to pull all of the issues assigned to people who work in your org, whether it's for a weekly status meeting or a quarterly review or just to see what's on your team's plate. Below are four ways of doing this in Jira.

We'll use the following organization for illustration

sample-org.png

1. Create manager rollup filters

The most direct way to select all users rolling up to a manager is to create a filter. 

  1. Go to Jira issue navigator
  2. Grab an org chart and list all the people in a director's org. For this example, we'll use Leo Moore
  3. Enter a query like 
    assginee in (Leo Moore, Mehmet Pierce, Chuck Barr, Kai Bentley, Carlos Brodie)
  4. Click on "Save filter" and call it "in-leo-moore-org"

create-filter.png

Now you can write queries like this to select only assignees in Leo Moore's org:

project=TEST and filter=in-leo-moore-org

Pros

  • Works in vanilla Jira
  • Can update filter if org changes

Cons

  • Tedious to construct and update
  • Easy to make a mistake
  • Must create a filter for each manager of interest
  • Must create a new filter for each kind of clause (for instance, you'll need another filter to select all issue reporters in an org)

2. Create Groups

If you only have a few managers to query for (and your Site Admin permits it), you can create a group for each manager. Technically, Atlassian groups are intended to manage permissions for users, so this is more of a workaround than a real solution. A better approach would be to create Teams for each manager, but there isn't a way to query based on Teams right now -- there's an open issue for this.

  1. Go to admin.atlassian.com
  2. Click on "Create group"
  3. Add users to the group

create-group.png

Once you have a group created, you can use it in JQL queries like this:

assignee in membersOf("leo-moore-org")

Pros

  • Works in vanilla Jira
  • Can update filter if org changes
  • Can use in any JQL fragment involving users. For instance 'reporter in membersOf("leo-moore-org")' will work without needing a new group

Cons

  • Not an intended use of Groups
  • Need to create a new Group for each manager of interest
  • Tedious to construct and update
  • Easy to make a mistake
  • Heavy-handed solution
  • Requires Site Admin permission

3. Add manager labels to issues

If you can do a little programming, you can add a chain of manager labels to each issue starting from the assignee up to some top-level manager. For instance, using the same org above, an issue assigned to Carlos Brodie would have the following labels: carlos-brodie, kai-bentley, leo-moore, william-maclane.

add-labels.png

To query for all issues rolling up to Leo Moore, you can write something like this:

project=TEST and labels = "leo-moore"

Pros

  • Works in vanilla Jira
  • Can query any manager

Cons

  • Requires an external script
  • Labels are only associated with one field (e.g., Assignee or Reporter or ...)
  • Script must be run regularly
  • Edge cases can lead to bugs
    • Label collisions
    • Need to remove labels when tickets are reassigned or there are re-orgs
  • Doesn't scale for large numbers of tickets and users

4. Use OrgJQL

The easiest way to query all managers rolling up to any level of manager is to use the OrgJQL plugin. After configuring the plugin with user/manager data, you can use the "orgOf" JQL function like this:

assignee in orgOf("Leo Moore")

use-orgjql.png

Pros

  • Can query any manager
  • Org data is added in a single place
  • No scripting required
  • JQL functions are updated automatically when org data is updated
  • Handles edge cases like cycles and missing managers
  • Supports customization of JQL functions directly in Jira
    • Can use organizational data
    • Can use data from Jira Rest API

Cons

  • Paid plugin

Takeaways

Jira doesn't directly support querying all users that roll up into a manager, but there are a number of options:

  • Creating a Manager Rollup Filter: This method works in vanilla Jira but is tedious to construct/update, is prone to errors, and requires a new filter for each manager and type of clause. 
  • Creating Groups: This approach involves creating a new permissions Group for each manager. This can be a bit heavy-handed and cumbersome to manage. It also requires support from your Site Admin. 
  • Adding Manager Labels to Issues: This technique allows querying any level of manager but requires an external script, regular maintenance, and won't scale well for large numbers of issues and people
  • Using OrgJQL: The OrgJQL plugin lets you query any level of manager while centralizing org data and eliminating the need for scripting. It also supports customization of JQL functions directly within Jira.

OrgJQL is free for up to 10 users and is available for a 30 day trial. If you manage a large team (or help manage large teams) and need to generate manager-specific reports, it can be a real time saver.

 

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events