Skip to end of metadata
Go to start of metadata

Additional validators and conditions enable you to perform checks in Jira based on a certain criteria:

Workflow validators

Workflow functionDescriptionParameters

Regex Validator

Checks that input value to a custom field satisfies the Regex expression.

Configuration: You must specify the custom field and Regex. The custom field values will be matched by the Regex. Optionally, you can also specify a custom error message.

You can check that story points are integer.

Unique Field Value Validator

Checks how many different values exist for a certain field in the ticket.

Configuration

You must specify

  • JQL in which the result field values of issues will be compared
  • Field the values for which will be compared
  • Maximum allowed non-unique values of the field in a JQL result
  • Alternative error message.

JQL Validator

Checks the count of issues in a JQL result.

Configuration

  • JQL – use %THIS% to point to a current issue key
  • Number of issues which should be the same as a number in a result JQL
  • You can also set an alternative error message if a comment is not provided.
  • JQL - use %SUMMARY% to point to the current issue summary.
    For example:
    project = "TEST" and Summary ~ "%SUMMARY%"

You can check that there is already an issue with the same summary.

  • Singular Status Validator. This validator checks that there are no issues in a status.
  • Links Validator. This validator checks that there are no linked issues in setted statuses.

Comment Validator

This validator requires a transition comment for all users except those specified in the exception group(s).

Configuration

  • You can specify the user groups that can skip providing a comment. 
  • You can also set an alternative error message if a comment is not provided. See example below

Example for a Comment Validator

Let's see how using this validator you can require all users except of the 'jira-developers' group to comment on a ticket when they transition it

  1. Go to Jira Administration > Issues > Workflows.
  2. Click Edit for a project where you want to add a validator.




  3. Select the Diagram view




  4. Select the transition where you want to add a validator, the configuration panel appears. 
  5. Select the Validators tab and click Add validator.



  6. Select the Comment Validator option and click Add



  7. Define validator parameters:
    • (Optionally) Select group(s) that should be able to skip the comment while transitioning tickets
    • Specify an alternative message to show to the users in order to prompt them to comment on a ticket during a transition.
    Click Update.



  8. To save changes, click Publish Draft.
  9. In the dialog that appears, select whether you'd like to backup project copy, and click Publish.



  10. That's it. (smile) Now, while making a ticket transition if you are not in 'jira-developers' you are required to comment every time that you are transitioning a ticket.


Workflow conditions

To set up the condition perform the same steps as setting up any validator or post-function.

Select the Condition option you need and click Add


Workflow conditionDescriptionExamples

Limit By Status Condition 

Limits the maximal number of issues with a specified status for a single user.


Configuration

You must specify the maximum number of issues with a specified status for a single user.

Has Attachments AM Condition

Checks whether an issue has attachments.

Has Links AM Condition

Checks whether an issue has links.

  • No labels