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

Compare with Current View Page History

« Previous Version 4 Next »

As described in A general note about JWT for Jira Cloud, it is not possible to use the JWT parser in conditions or validators. So the JWT DC Logical validator is not available in JWT Cloud. Instead, the Jira expression validator can be used. The JWT parser expression has to be migrated to a Jira expression.

Create a Jira expression validator

Since the basic concept of JWT parser expressions is strictly different from Jira expressions, it is not possible to migrate them directly. We describe below the basics.

Field codes

Jira expression Field codes differ from the JWT ones, a list of corresponding field codes can be found in Field codes. They are offered in the field code injector of the parser expression editor of the Jira expression validator. For further details of Jira expression field codes please refer to Atlassian's documentation.

Operators

JWT DC
  

Jira expressionNotes
===
!=!=
<<
<=<=
>>
>=>=
~.includes()

Example:

issue.summary.includes("issue")
!~!...includes()

Example:

issue.summary.includes("issue")
IN

.every....includes()

Example:

issue?.subtasks?.every(s=>issue?.links?.map(link => link.linkedIssue.key).includes(s.key))
NOT IN ! every....includes()

Example:

!issue?.subtasks?.every(s=>issue?.links?.map(link => link.linkedIssue.key).includes(s.key))
ANY IN.some()....includes()

Example:

issue?.subtasks?.some(s=>issue?.links?.map(link => link.linkedIssue.key).includes(s.key))
NONE IN!....some()....includes()

Example:

!issue?.subtasks?.some(s=>issue?.links?.map(link => link.linkedIssue.key).includes(s.key))

Functions

Jira expression functions are based on the respective data type and are related to JavaScript notion. Details of the available functions can be found in Atlassian's documentation.

Examples

JWT DC use case

JWT DC parser expression

Jira expression
Make "Time spent" field required
{issue.timeSpent} > 0
issue?.timeSpent >0
Block an Epic's transition until all the issues under that Epic are resolved
%{issue.issueType} = "Epic" IMPLIES count(filterByResolution(issuesUnderEpic(), "")) = 0
issue?.issueType?.name == "Epic" ? issue?.stories?.every(s=>s.resolution != null) : true
issue?.isEpic ? issue?.stories?.every(s=>s.resolution!= null) : true
Block a transition until all sub-tasks have certain fields populated
count(filterByPredicate(subtasks(), {function.issue.dueDate} != null)) = count(subtasks())
issue?.subtasks?.every(i=>i.dueDate != null)

The parameter "Validation options" is not available in JWT Cloud. 

Due to the different architecture, it may happen that the condition gets too complex. The condition cannot be saved and a corresponding error message will be displayed. Split the condition into two or more. 

Parameter "Error message"

It is not possible to use the JWT Cloud expression parser in Jira Cloud validators, so the error message must consist of a fixed text, field codes are not working here.

No location or translation option is available in JWT Cloud.



If you still have questions, feel free to refer to our support team.