Versions Compared

Key

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


UI Text Box
sizemedium
typeinfo

Logical expressions in JWT Cloud are built the same as in JWT DC. In addition to the basic differences in field codes and expression parser functions, there are a few other minor differences that are explained on this page.



UI Expand
titleMulti-valued fields

In JWT DC so-called multi-valued fields are treated as lists (and not as simple text) when using the following logical operators :

JWT DC operator

Meaning
~contains
!~does not contain
in is contained in
not in is not contained in
any inany element is in
none innosingle element is in
~~contains (case ignoring)
!~~does not contain (case ignoring)
in~is contained in (case ignoring)
not in~is notcontained in (case ignoring)
any in~any element is in (case ignoring)
none in~no single element is in (case ignoring)


That means that in JWT DC it is possible to write expressions like 

Code Block
languagejava
%{issue.components} any in %{parent.components}

In JWT Cloud, this notion is not available. An expression dealing with such a multi-valued field has to be migrated by explicitly converting the field code value using the function toStringList (or toNumberList, respectively).

The following fields are considered multi-valued fields:


UI Text Box
sizemedium
typenote

In order to migrate multi-valued fields in logical expressions, apply the toStringList() to the respective field.

Examples

JWT DC expression

 JWT CLoud expression


Code Block
%{issue.versions} none in %{issue.fixVersions}



Code Block
toStringList(%{issue.versions}) none in toStringList(%{issue.fixVersions})



Code Block
 %{issue.labels} any in ["Backend", "Frontend"] 




Code Block
toStringList(%{issue.labels}) any in ["Backend", "Frontend"]




UI Expand
titleCase ignoring operators

In JWT DC, some case-ignoring operators are available (for details please see the respective part in the description of JWT DC's Logical mode). They are not available in JWT CLoud.

JWT DC operator

Meaning
=~equal to

!=~

not equal to
~~contains
!~~does notcontain
in~is contained in
not in~is not contained in
any in~any element is in
none in~nosingle element is in


As a work around you can use the functions toUpperCase() / toLowerCase() for both operands and use the respective case sensitive operator. If an operand is a list, it first has to be converted to a text first using toString().

Examples

JWT DC expression

JWT Cloud expression


Code Block
"HELLO" =~ "Hello"



Code Block
toUpperCase("HELLO") = toUpperCase("Hello")



Code Block
%{issue.labels} ~~ ["Backend","Database"]



Code Block
toStringList(toLowerCase(%issue.labels})) ~ toStringList(toLowerCase(toString(["Backend","Database"])))


UI Text Box
typenote

In this case, we are dealing with a multi-valued field and thus have to convert it to a text list using toStringList() before comparing.





Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue