Numbers

JWT for Jira Cloud 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

  • 1

  • 3.141592

  • .5

  • -400

  • -1.1 

  • -.02

Variable values (field values)

Numeric values of  number  data type fields can be inserted as a field code in any expression 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:

  • X + Y : adding two numbers

  • X - Y : subtracting X from Y

  • X * Y: multiplying two numbers

  • X / Y: dividing X by Y

X and Y are real numbers.

Function Short description Output
abs(number)

Returns the absolute value of the input number.

number

ceil(number)

Returns the smallest mathematical integer that is greater than or equal to the input number.

number

floor()

Returns the greatest mathematical integer that is less than or equal to the input number.

number

max(numbers)

Returns the larger of two numeric values.

number

min(numbers)

Returns the smaller of two numeric values.

number

modulus(numbers)

Returns the remainder after division of the dividend by the divisor.

number

projectId()

Returns the ID of the project with a given key or name.

number

random()

Returns a number between 0 and 1.0.

number

round(number)

Returns the closest integer to the input number.

number