JQL functions

Project Team comes with a JQL function named getUsersByAdditionalAttribute that can be used in JQL queries to filter the Jira issues by their user fields (like reporter or assignee) when using the IN keyword. The function returns the users who have an additional attribute (a user custom field added with Project Team app) that matches a certain condition. The user attribute, the condition and the expected value are specified through the function arguments.

Syntax

getUsersByAdditionalAttribute(userCustomFieldName, condition, expectedValue)

Arguments

userCustomFieldName - represents the name of the additional attribute (user custom field). It is case sensitive. Cannot be empty.

condition - represents the condition (operator) that the specified attribute must match. Cannot be empty. The condition must match the type of the user custom field specified in the first argument. The supported conditions are the ones from the table below.

User Custom Field Type

Supported conditions

Single Line Text

'is', 'is not', 'contains', 'does not contain', 'begins with', 'does not begin with', 'ends with', 'does not end with', 'in', 'not in'

Multi Line Text

'is', 'is not', 'contains', 'does not contain', 'begins with', 'does not begin with', 'ends with', 'does not end with'

Multi Value Picker

'has any of'

User Picker

'is', 'is not', 'in', 'not in'

expectedValue - represents the value to match. It cannot be empty. For conditions like 'in', 'not in' or 'has any of' that supports multiple values, you can enter multiple values separated by comma (",").

Usage examples

In this example, the JQL assignee IN getUsersByAdditionalAttribute("Phone", "is", "201 665 23123") will return all the Jira issues assigned to the user (Kate Millet) that has phone number "201 665 23123" set in her Profile under Additional Attributes.

Other usage examples:

reporter IN getUsersByAdditionalAttribute("Region", "begins with", "A")
assignee IN getUsersByAdditionalAttribute("Manager", "in", "john.smith, dorothy.grey")
assignee IN getUsersByAdditionalAttribute("City", "in", "Seattle, Los Angeles, San Francisco")
assignee IN getUsersByAdditionalAttribute("Spoken Languages", "has any of", "French, Spanish")