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

Compare with Current View Page History

« Previous Version 12 Next »

On this page

Introduction

Time to be creative(lightbulb)

A huge number of potential use cases can be addressed by using Jira expressions which is currently a Cloud Only feature provided by Atlassian. Jira expressions can be a powerful tool but they come with limitations .

To master Jira expressions we strongly recommend reading the information we condensed on this single page . Especially when it comes to the difference between Jira expressions and JWT for Jira Cloud parser expressions .



The configuration

To configure this validator you only need to specify two input parameters - the Jira expression and an error message to show when the validator fails.

Additionally you can test your expression by selecting a dedicated issue to test against.


ParameterDescription
Jira expression  *

Enter plain text and optionally use field codes , e.g. issue.summary, to insert field values. The result of the Jira expression shall return true or false .

(warning) Remember, that the usage of virtual fields is different when being used in Jira expressions (no need to add brackets {}).

Error message *

Enter the message to show to the end user when the validation fails.

Test expression

Select an issue for the context of the evaluation of the given Jira expression. After clicking the "Evaluate" button the result of the evaluation is shown in a message box below.

If the syntax of the Jira expression is wrong or the evaluation with the given context issue returns an error, an error box with the respective error is displayed in an error box below.


Get started

Get started by trying out the example configurations provided out of the box.



The following example configurations are currently available:


Additional use cases can be found here!

Test your expression

It is highly recommended to test your Jira expression before publishing the workflow. 

To test an expression simply select an existing issue ad click on .

As a result you might encounter four different responses:

ResponseOutputExplanation
(tick) Response: The value returned by the expression

Jira expressions usually expect the return of a boolean true or false.

(warning) If you just enter a field code without any comparison operator you will simply get the value as a response!

In this use case 'Task' will be returned as the current issue type.

(tick) Response: true

This response indicates that the expression itself is valid and the parent of the test issue (KANBAN-4) is an Epic.
(tick) Response: false

This response indicates that the expression itself is valid but parent of the test issue (KANBAN-4) is not a Story

Response: error

There is a syntax error in the specified expression.

In this case a missing "=".

The correct syntax would be 

issue.parent != null && (issue.parent.issueType.name == 'Story')