On this page
JWT is a number specialist!
Numbers can be provided as fixed values - or literals - in the format described in the table below or they can be retrieved by using field codes.
Fixed values
Numbers can be added to any expression as fixed values.
Input | Example |
---|---|
Valid numerical values |
|
Variable values (field values)
Numeric values of NUMBER data type fields can be inserted in any expression as number field codes using the following notation {...somenumberfield}
- e.g {issue.votes}
.
The most common use cases for calculating with numbers are in fact related to dates and times, since these timestamps are internally represented as numbers.
Mathematical functions
JWT is very powerful when it comes to numbers and calculations. It offers a wide range of mathematical functions to be used in a parser expression.
Besides the functions listed below, JWT offers the common arithmetical operators:
- Number1 + Number2 : adding two nunbers
- Number1 - Number2 : subtracting Number2 from Number1
- Number1 * Number2 : multiplying two numbers
- Number1 / Number2 : dividing Number1 by Number2
Available functions
Function | Short description | Output |
---|---|---|
abs() | Returns the absolute value of the input number. | NUMBER |
acos() | Returns the arccosine value of the input number. | NUMBER |
asin() | Returns the arcsine value of the input number. | NUMBER |
atan() | Returns the arctangent value of the input number. | NUMBER |
cbrt() | Returns the cube root of the input number. | NUMBER |
ceil() | Returns the next higher integer. | NUMBER |
cos() | Returns the cosine of the given number. | NUMBER |
cosh() | Returns the hyperbolic cosine of the input number. | NUMBER |
floor() | Returns the the next lower integer. | NUMBER |
log10() | Returns the base 10 logarithm of the input number. | NUMBER |
log() | Returns the natural logarithm of the input number. | NUMBER |
max() | Returns the larger of two numeric values. | NUMBER |
min() | Returns the smaller of two numeric values. | NUMBER |
modulus() | Returns the remainder after division of the dividend by the divisor. | NUMBER |
pow() | Returns the exponentiation of two numbers. | NUMBER |
random() | Returns a number between 0 and 1.0. | NUMBER |
remainder() | Returns dividend - divisor * n, where n is the closest integer to dividend/divisor. | NUMBER |
round() | Returns the closest integer to the input number. | NUMBER |
sin() | Returns the trigonometric sine of angle number expressed in radians. | NUMBER |
sinh() | Returns the hyperbolic sine of the input number. | NUMBER |
sqrt() | Returns the square root of the input number. | NUMBER |
tan() | Returns the trigonometric tangent of angle number expressed in radians. | NUMBER |
tanh() | Returns the hyperbolic tangent of the input number. | NUMBER |
toDegree() | Converts an angle measured in radians to an approximately equivalent angle measured in degrees. | NUMBER |
toRadians() | Converts an angle measured in degrees to an approximately equivalent angle measured in radians. | NUMBER |
If you still have questions, feel free to refer to our support team.