Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Click Add to add the validator to the transition.
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 Jira expression, etc.

To add a 'User Validator' to a transition:

  • Click Edit for the workflow that has the transition you wish to configure the validator on.

  • In the Workflow Designer, select the transition.

  • Click Validators in the properties panel.

  • Click  Add validator.

  • Select User Validator from the list of validators.

  • Click Add to add the validator.

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

  • Customize the Error message.

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

    Include Page
    [Includes] Add Validator
    [Includes] Add Validator
    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 (JSDCLOUD-5853) with Atlassian.

    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.

    Configure the validator

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

    2. From the list of validators, select Build-your-own (scripted) Validator (JMWE app).

    3. The Build-your-own (scripted) Validator page will open. Configure the validator as needed. See below for details on each of the configurations.

    4. Click Add.

    Note

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

    The following configurations are available:

    • 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
      • - The current user will be checked.

      • User(s) in field

    : the
      • - The user in the specified field, such as Assignee, Reporter, or any User Picker custom field, will be checked. 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
      • - Each user will need to satisfy every criterion.

      • at least one of the criteria configured below

    : each
      • - Each user will need to satisfy at least one of the criteria.

      • or the field can be empty

    : if you select the “at
      • - Only available if User(s) in field and 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
      • below are both set. Choose this option if 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
    • - 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:

    is
        • the Reporter

    is
        • the Assignee

    is
        • a Watcher

    is
        • a Voter

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

      • Groups - The user belongs to one of the specified groups

    belongs to
      • .

      • Users - The user is one of a list of specific users

    belongs to a
      • .

      • User fields - The user is selected in the specified user-type field, such as a user picker custom field

    satisfies
      • .

      • Condition for user(s) - The user or users satisfy a Jira expression. For each user to check, the Jira expression will be evaluated and must return true for the validation to succeed. Note that the user being checked is available through the selectedUser variable.

    Error message

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

    Validator Scope

    Select Conditional validation if you want validation to only occur in certain cases. For example. if the issue is of a certain issue type, has certain field values, or satisfies a Jira expression.
      • Reverse condition - If this box is checked, the condition specified in Condition for user(s) must return false for the validation to succeed.

    Note: The user being checked in your Jira expression is available through the selectedUser variable.

    • Error message - The error message that will display if the validator fails.

    • Validator scope

      • Conditional validation - Check this box to configure the validator to only run in specific circumstances.

      • Condition - Only visible when Conditional validation, above, is checked. Enter a Jira expression; if the expression evaluates to true, the validator will run.

      • Skip validation when cloning an issue - Check this option to skip the validator when an issue is being cloned.

    Info

    You are viewing the documentation for Jira Cloud.

    User Validator Configuration ScreenImage Added