User Condition

This workflow condition allows you to hide or show a particular transition from the list of available workflow actions based on either the current user or users in a specific field meeting certain criteria. Examples include being the reporter or assignee, belonging to certain groups or project roles, satisfying a Groovy condition, etc.

Configure the condition

  1. Follow the steps above to add a condition to a transition.

  2. From the list of conditions, select User condition.

  3. Click Add.

  4. The User condition page will open (Figure 1, right). Configure the condition as needed, setting the options for users to check, mode, and criteria as necessary. See below for details on each of the configurations.

  5. Click Add.

Note that you need to publish the workflow for the new condition to take effect.

User(s) to check

You must first configure which user(s) need to be checked. Either the current user can be checked, or the condition can check user value(s) in an issue field such as Assignee, Reporter, or any user picker custom field.

  • Which user(s) - Select which user will be checked against the criteria, detailed below.

    • Current user - the current user will be checked.

    • User(s) in field - the user in the specified field, such as Assignee, Reporter, or any User Picker custom field, will be checked.

Please note, if the selected field is a multi-valued field, such as Voters or Watchers, or another Multi-user Picker custom field, all users in that field will be checked, and they all must satisfy the criteria.

Mode

Specify whether the user(s) to be checked must satisfy all the configured criteria or at least one.

  • User(s) must meet

    • all the criteria configured below - each user will need to satisfy every criterion.

    • at least one of the criteria configured below - each user will need to satisfy at least one of the criteria.

      • or the field can be empty - if you select the option ‘at least one of the criteria configured below’ option and the User(s) to check is set to User(s) in field, you can also set whether an empty field satisfies the condition. For example, if you are checking the Assignee field and you select this option, the condition will succeed and the transition will be available even if the issue is unassigned.

Criteria

You need to specify at least one criterion that the user(s) must satisfy for the condition to succeed and the transition to become available. You can check whether each user has a specific relationship to the issue, is a member of a specific project role or group, or is a specific user. The options are:

  • The user is:

    • The user is the Reporter

    • The user is the Assignee

    • The user is a Watcher

    • The user is a Voter

    • The user is a Project lead

  • Project roles: The user belongs to one of the specified Project Roles of the issue’s project.

  • Groups: The user belongs to one of the specified groups.

  • Users: The user is in the list of specific users.

  • User fields: The value of the selected field, such as a user picker custom field, matches the user.

  • Condition for user(s): The user satisfies a Groovy condition (script). For each user to check, the Groovy script will be evaluated and must return true (or a truthy value) for the transition to be available. Note that the user being checked is available through the user global variable.

  • Reverse condition: Checking this option will cause the condition to evaluate in reverse; a condition that would evaluate to TRUE will instead evaluate to FALSE, and vice versa.

You are viewing the documentation for Jira Server / Data Center.

On This Page

Figure 1 - User Condition