Breadcrumbs

Assignee's groups

📚

This template displays all groups the assignee of the current work item belongs to.

If there is nothing to display, the result will be “None”.

Configuration

To use the Assignee’s groups template, simply select it from the template grid. Filter by Assignee to find it faster.

Parameters

This template does not require any additional parameter configuration.

Expert mode

If you switch to Expert mode you can see the formula field in the Expression Parser. You can now tweak the expression to create a custom formula field based on this template.

Expression

Jira expression:

issue.assignee?.groups || ""

Details

1. What does the expression do?

The expression returns a list of all groups that the assignee of the current work item belongs to. If the assignee does not belong to any groups, or if there is no assignee, it returns an empty string.

2. Step-by-step breakdown

  • issue: Refers to the current work item (previously referred to as "issue" in Jira expressions).

  • assignee: The person assigned to the current work item.

  • ?.: This is called the "optional chaining operator." It safely checks if the assignee exists before trying to access their groups. If there is no assignee, it prevents an error.

  • groups: The list of groups that the assignee belongs to.

  • || "": This means "or an empty string." If the left side (the groups) is empty, missing, or undefined, it will return an empty string instead.

3. Examples

  • If the assignee is "Alice" and she belongs to the groups "Developers" and "QA", the expression will return: ["Developers", "QA"].

  • If the work item has no assignee, the expression will return: "" (an empty string).

  • If the assignee exists but does not belong to any groups, it will also return: "".

4. Real-life use cases

  • Displaying all the groups that the person assigned to a work item is part of, for reporting or permissions purposes.

  • Creating custom fields or reports that show team memberships for assigned users.

  • Filtering or sorting work items based on the groups of their assignees (for example, to see which teams are handling which tasks).