Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

User Validator

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 you wish to configure the validator on.

  2. In the Workflow Designer, select the transition.

  3. Click on Validators in the properties panel.

  4. Click on Add validator.

  5. Select User Validator from the list of validators.

  6. Click on Add to add the validator.

  7. Configure the user(s) to check and the criteria (see below).

  8. Customize the Error message.

  9. Click on Add to add the validator to the transition.

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.

Related links:

When you add this validator to a transition and trigger the transition, the validator checks whether the configured user(s) satisfy the configured criteria, and displays a validation error message if not.

User(s) to check

You must first configure which user(s) need to be checked. You can check either the current user, or 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. If the selected field is a multi-valued field, such as Voters, Watchers, or a Multi-user Picker custom field, all users in that field will be checked, and they all need to satisfy the criteria.

Mode

You need to 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 “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:

  • is the Reporter

  • is the Assignee

  • is a Watcher

  • is a Voter

  • belongs to one of the specified Project Roles in the issue’s project

  • belongs to one of the specified groups

  • belongs to a list of specific users

  • belongs to a field, such as a user picker custom field

  • 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 validation to succeed. Note that the user being checked is available through the user global variable.

Error message

If validation fails, a default error message will be displayed, which summarizes the reason(s) validation failed. You can customize this error message by typing a custom Error message.

Validator Scope

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