Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

A workflow validator that can validate that either the current user or users in a specific field meet certain criteria, such as being the reporter or assignee, belonging to certain groups or project roles, satisfying a Groovy condition, etc.

To add a 'User Validator' to a transition:

  1. Click Edit for the workflow that has the transition to which the validator should be added.

  2. In the Workflow Designer:

    1. If viewing the workflow as Text, click the name of the transition and click the Validators tab.

    2. If viewing as a diagram, select the transition and click Validators in the properties panel.

  3. Click Add validator.

  4. Select User validator from the list of validators.

  5. Click Add.

  6. Configure the user(s) to check and the criteria. See below for more information.

  7. Customize the Error message.

  8. Click Add to add the validator to the transition.

Note

On the Service Management portal view of a request, the customer will not see the Error message when the validator fails. This is due to a known limitation (JSDSERVER-5822) with Atlassian.

Image Removed

User(s) to check

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

  • 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 check.

Please note, if the selected field is a multi-valued field, such as Voters or Watchers, or a 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.

  • 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 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 decide whether an empty field satisfies the validator. For example, if you are checking the Assignee field and you select the “or the field can be empty” option, the validator will succeed even if the issue is unassigned.

Criteria

You need to specify at least one criterion that the user(s) must satisfy for the validator to succeed. You can check whether each user:

  • The user is:

    • The user is the Reporter

    • The user is the Assignee

    • The user is a Watcher

    • The user is a Voter

  • 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 validator to evaluate in reverse; a validator that would evaluate to TRUE will instead evaluate to FALSE, and vice versa.

Error message

If the validation fails, a default error message will be displayed which summarizes the reason(s) the validation failed. To display something specific, enter a customized message.

Validator Scope

To execute this validator based on the result of a groovy expression see Conditional execution using Groovy expression

Info

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

On This Page

Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse
Image Added