Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Contents

The JIRA Suite Utilities plugin provides three additional workflow validators:

  • Date Compare
  • Date Expression Compare
  • Fields Required
  • Window Dates

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

On this page:

Date Compare Validator

Description

The 'Date Compare' validator compares the values of two date fields on the issue (for example, one field must be greater than the other). If the validation fails, the transition will not be completed.

Configuration

You must select the two date fields and the comparison function for the validator, when configuring the transition. For example:

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 Compare' validator where '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 validation will fail and the transition will not be completed.

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:

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 have been entered. If the validation fails, the transition will not be completed.

Configuration

You must select mandatory fields, when configuring the transition. For example:

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 does not have a value entered, the validation will fail and the transition will not be completed.

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:

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.