Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column

The JIRA Suite Utilities plugin provides these additional workflow validators:

  • Date Compare
  • Date Expression Compare (since version 1.4.8)
  • Fields Required
  • Regular Expression Check (since version 1.4.9)
  • Window Dates

For information on workflow validators in JIRA, see the JIRA documentation.

Column
width400px
Panel

On this page:

Table of Contents
maxLevel2
minLevel2

Date Compare Validator

...

Description

...

Panel
bgColor#f5f5f5
titleColor#ffffff
borderWidth0
titleBGColor#000000
titleJSU for Jira Server/Data Center

This is the documentation for JSU for Jira Server/Data Center. If you are using JSU on Jira Cloud, see our JSU Cloud documentation.

Excerpt

Description

The Date Compare validator compares the values of two date fields on

...

an issue

...

, for example, one field must be greater than the other

...

. If the

...

check fails,

...

no action will

...

be

...

performed.

Configuration

You must select the two date fields and the comparison function for the

...

check.

Example

A workflow is configured so that the

...

Resolve

...

transition has the

...

Date Compare

...

validator

...

set to Resolved Date

...

<=

...

Due Date

...

. If a user attempts to resolve an issue on this workflow, where the

...

Resolved Date

...

is after the

...

Due Date

...

, the

...

check will fail and

...

no action will

...

be

...

Regular Expression Check Validator

...

Description

...

The 'Regular Expression Check' validator compares the value of a text, number or url's field against a regular expression. For example to verify that the content matches a given format.

Since version 1.4.10, selection fields, radio buttons and multi selection fields are also supported.

...

Configuration

...

You must select the field  to validate and enter the regular expression. For example:

Image Removed
For information on how to configure a validator in JIRA, see the JIRA documentation.

...

Example

...

A workflow is configured so that the 'Resolve' transition has the 'Regular Expression Check' validator where 'TextField' has to match '[a-z]*'. If a user attempts to resolve an issue on this workflow, where the 'TextField' is for example '7 pieces', the validation will fail, and the transition will not be completed. However 'pieces' as content would be allowed.

Window Dates Validator

...

Description

...

The 'Window Dates' validator checks whether the value of one date field falls within the range (window) of another date field. Note, the date checking is only one-way, i.e. it only looks forwards, not backwards. If the validation fails, the transition will not be completed.

...

Configuration

...

You must select the two date fields and the window period, when configuring the transition. For example:
Image Removed
For information on how to configure a validator in JIRA, see the JIRA documentation.

...

Example

...

A workflow is configured so that the 'Close' transition has the 'Window Dates' validator. The 'Resolved Date' is validated using a window of 5 days with respect to the 'Created Date'. If a user attempts to resolve an issue on this workflow, where the 'Resolved Date' is more than 5 days after the 'Created Date', the validation will fail and the transition will not be completed.

Supported Field Types

Include PageSupported Field TypesSupported Field Types

performed.

Date Expression Compare Validator

...

Description

...

The 'Date Expression Compare' validator compares the value of a date field with a date expression (for example, date field must be more recent than actual date). If the validation fails, the transition will not be completed.

...

Configuration

...

You must select the date field, the comparison condition, the date expression itself, and optional whether to include the time part for comparison. For example:
Image Removed
For information on how to configure a validator in JIRA, see the JIRA documentation.

...

Example

...

A workflow is configured so that the 'Resolve' transition has the 'Date Expression Compare' validator where 'Due Date' > '5d'. If a user attempts to resolve an issue on this workflow, where the 'Due Date' is less than 5 days from now, the validation will fail and the transition will not be completed.

Fields Required Validator

...

Description

...

The 'Fields Required' validator checks whether values for specified fields are set for a given transition. If the validation fails, the transition will not be completed.

Since version 1.4.10, Σ Time Spent may be used to validate that work has already been logged once, before the current transition or within itself. And a new option has been added, to be able to ignore the context check on fields made by the plugin.

...

Configuration

...

You must select mandatory fields, when configuring the transition. For example:
Image Removed
For information on how to configure a validator in JIRA, see the JIRA documentation.

...

Example

...

A workflow is configured so that the 'Resolve' transition has the 'Fields Required' validator where 'Fix Version' is mandatory. If a user attempts to resolve an issue on this workflow, where the 'Fix Version' field its value not set, the validation will fail and the transition will not be completed.

Example configuration of the Date Compare validator as described on this page.Image Added

Optional error message

You can define a custom error message for JSU validators to provide a clear explanation of the situation to your users. If you leave this field empty, a default error message from Jira will be displayed on validation errors.