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

Compare with Current View Page History

« Previous Version 4 Next »

The condition Condition based on cascading select list value is not yet available in JWT Cloud, but you can implement it easily using the Jira expression condition.

As described in A general note about JWT for Jira Cloud, it is not possible to use the JWT field codes in conditions or validators. That is the reason why JWT Cloud cannot provide a one-to-one mapping of the fields which can be selected in this condition.

Create a Jira expression condition

The Jira expression which will be built is depending on the parameter values of the JWT DC condition. The following table shows how to obtain the individual components of the resulting Jira expression and it is described how to assemble these parts into a Jira expression.

JWT DC
  

JWT DC option

JWT Cloud

Notes
Field

Select the corresponding cascading select field from the Field injector.

Example

issue?.customfield_10044

Please note, that not all fields known in the JWT DC parser are available as Jira expression field code.

Option levelParent

Add ?.value to the field code selected in the Field parameter.

Example

issue?.customfield_10044?.value
Child

Add ?child?.value to the field code selected in the Field parameter.+

Example

issue?.customfield_10044?.child?.value

Comparison operatoris equal

Add = to the expression built so far.

Example

issue?.customfield_10044?.child?.value =

isn't equal

Add != to the expression built so far.

Example

issue?.customfield_10044?.child?.value !=

contains

Add .includes() to the expression built so far.

Example

issue?.customfield_10044?.child?.value.includes()

doesn't contain

Add .includes() to the expression built so far and put the negation operator ! in the beginning of the expression.

Example

!issue?.customfield_10044?.child?.value.includes()

starts with

Add .indexOf() == 0  to the expression built so far.

Example

issue?.customfield_10044?.child?.value.indexOf() == 0

doesn't start with

Add .indexOf() !== 0 to the expression built so far.

Example

issue?.customfield_10044?.child?.value.indexOf() != 0

ends with

Add .match("$") != null  to the expression built so far.

Example

issue?.customfield_10044?.child?.value.match("$") != null

doesn't end with

Add .match("$") == null  to the expression built so far.

Example

issue?.customfield_10044?.child?.value.match("$") == null

Comparison value

If you are using field codes in the Comparison value, you have to replce them by the Jira expression field codes (using the Field code injector) and concatenate them with the remaing text using "+". All other texts have to be quoted (enclosed by "").

Put this value either as right-hand operator or as parameter in the ()-part of the current expression (depending on the Comparison operator which is used, in case of "ends with"/"doesn't end with" put in right before the "$").

Examples

Comparison operatorComparison valueJira expression
starts with"label"
issue?.customfield_10044?.value.indexOf("label") == 0
containsFirst %{issue.description} 
issue?.customfield_10044?.value.includes("First"+issue.description.plaintext)
dosn't equal3
issue?.customfield_10044?.value != "3"

Examples

JWT DC parameter valuesJira expression
ParameterValue
Field%{issue.cf10003}
Option levelParent
Comparison operator=
Comparison value%{issue.summary}
issue?.customfield_10003?.value == issue.summary
ParameterValue
Field%{issue.cf10042}
Option levelChild
Comparison operatorstarts with
Comparison valueFirst
issue?.customfield_10042?.child?value.indexOf("First") == 0
ParameterValue
Field%{issue.cf10042}
Option levelChild
Comparison operatordoesn't contain
Comparison valueChild value of %{issue.key}
!issue?.customfield_10042?.child?value.includes("Child value of "+issue.key)
ParameterValue
Field%{issue.cf10042}
Option levelChild
Comparison operatordoesn't end with
Comparison value%{issue.key} value
issue?.customfield_10044?.child?.value.match(issue.key+" value$") == null