Shared Validator

An extension that runs a shared validator, created on the Shared extensions page, against the current issue (or issues related to the current issue) verifying that specific criteria are met before an issue can transition to a new stage.

This validator together with Shared extensions enables you to reuse the most frequently used configurations quickly without having to configure the same scenario multiple times. Any change made to a shared extension is instantly applied to all the workflow transitions where it is used.

To add the 'Shared validator' 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 Shared validator from the list of validators and click Add. The Shared validator screen (pictured, below) opens.

  5. Add the configuration details as specified in the Configuration details section, below.

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

  7. Publish the workflow.

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

On This Page

Configuration details

Add the following details to configure the validator to fit your scenario:

  • Shared validator: Select one of the shared validators to be run. The list of shared validators displayed here is defined in Shared extensions.

  • Error Handling: Make transition fail when an error occurs in this extension: Select this option to make the transition fail when an error occurs while running the validator. An error message is displayed to the user notifying them of the transition failure.

Example

Scenario: A workflow requires that the issue is assigned to a Support Team member to be moved to specific stages.

Solution: Any transition requiring that type of Assignee should have a User Validator applied.

Perform the following:

Step 1. Create a new Shared extension.

  1. Click the Administration button in the upper right corner and select Manage apps.

  2. Under JIRA MISC WORKFLOW EXTENSIONS click Shared extensions.

  3. Click the Validators tab.

  4. Click Add shared validator to the right of the tabs.

  5. Add the following:

    • Validator name: Enter a meaningful name for the action.

    • Description: Enter a more detailed explanation of what the extension would accomplish.

    • Validators: Add a validator:

      1. Click Add validator.

      2. Select User Validator from the list of validators and click Add.

      3. Under User(s) to check, set Which user(s) to ‘Assignee (assignee)’.

      4. Under Mode, set User(s) must meet: to ‘all the criteria configured below’.

      5. Under Criteria, set Project roles: to ‘Service Desk Team’.

      6. Set the Error message value, if desired.

      7. Click Add.

  6. Click Save and the newly created validator is added to the Shared validators list.

Step 2. Add the Shared Validator validator to the workflow transition

  1. Click Edit for the workflow that has the appropriate transition or transitions.

  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 Shared validator from the list of validators and click Add. The Shared validator window will open.

  5. Select the newly created shared validator you created in Step 1.

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

  7. Publish the workflow.

Figure 1 - Shared Validator validator