Versions Compared

Key

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


UI Text Box
sizemedium
typeinfo

This condition validator is used for hiding or blocking a  a transition depending on the result of a JQL query. 


Image AddedConfiguration

ui-text-boxexpand
typetitletip

Field codes in the format %{nnnnn} can be inserted in the JQL query. It will be replaced by the corresponding field values at JQL execution time. Most of the times you will require to introduce one or more field codes in your JQL query since usually some kind of reference to the current issue (%{00015}), current user (%{00020}), current date (%{00057}), assignee (%{00003}) wants to be made.

Image RemovedConfiguration

JQL

Enter a JQL query using the JQL mode of the expression editor. The current issue will be matched against the result set of the query

UI Expand
titleJQL

Enter plain text and optionally use Field codes, e.g. %{issue.summary}, to insert field values.

UI Text Box
typetip

Test your expression by clicking the run button on the top right of the expression boxIt is very common to use field codes inside the JQL query.



UI Expand
titleConditionValidation

Define how the issue should be compared against the result set of the JQL query. You have Choose the condition from one of the following options:

OptionDescription

Current issue belongs to the output of the query

The condition is passed, if the current issue is part of the result set of the JQL query.

Current issue doesn't belong to the output of the query

The condition is passed, if the current issue is not part of the result set of the JQL query.

Number of issues returned by the JQL query satisfies a logical expression

An Expression* field will appear, and there you would have to enter a valid logical expression that must return true

Define a logical expression in Logical mode which must return true or false.

UI Text Box
typetip

Test your expression by clicking the run button on the top right of the expression box.

The number of issues returned by the query is stored in the Temporary number field 1. This is why this value is automatically added to your logical expression.


Example for a logical expression

JQL queryExpressionDescription


Code Block
project = %{issue.project.key} and type = Bug and resolution is empty



Code Block
{issue.temporaryNumber1} < 5


The validator will pass, if there are less than 5 unresolved Bugs in the current issue's project.



f the create transition is triggered by a mail handler, the validation will be skipped.

UI Expand
titleValidation options

Include Page
DECADIS:_snip_skip validation
DECADIS:_snip_skip validation

UI Expand
titleValidation options

Choose from one of the following options (multi-choice is possible):

OptionDescription

If the transition is triggered by a JWT post function, the validation will be skipped.

If the transition is triggered by a bulk operation, the validation will be skipped.

If the create transition is triggered by a clone operation, the validation will be skipped.


UI Expand
titleError message

Include Page
DECADIS:_snip_error_message_validator
DECADIS:_snip_error_message_validator


Add translation

UI Expand
iconfalse
titleRun as

Include Page
DECADIS:_snip_runAs_Server_JQL
DECADIS:_snip_runAs_Server_JQL

Add an optional error message to show when validation fails.

Location

Define where the error message should be displayed.

Message

For the message content to be displayed when an error occurs, enter plain text and optionally use Field codes, e.g. %{issue.summary}, to insert field values.

UI Text Box
typetip

Test your expression by clicking the play button on the top right of the expression box.

UI Button
title


UI Text Box
iconfalse
type
info

Click on the Add translation button and choose the desired language to be translated to.

Translations will be displayed based on the user's language setting.

UI Expand
iconfalse
titleRun as
tip

If you want to use this functionality in a condition instead, have a look at the following condition: Condition based on JQL queryChoose which user* will be able to execute this post function. By default, it is set to the Current user.



Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Label
cqllabel = "use-case-workflow" and space = currentSpace() and parent = currentContent(ancestor in ("32215802","32213779")


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue


Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titletododone

Style guide

Status
colourYellowGreen
titleReady for reviewdone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged


Page properties
hiddentrue


Short descriptionValidation on Validate the current issue against the result of a JQL query.
Label

Status
colourRed
titlestaff pick



Page properties
hiddentrue
id1


Mapped(error)
Notes

Currently, this validation option is not available on JWT Cloud, only in server.