Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
absoluteUrltrue

Formulas

Formulas are constructed by stringing together operators, values and functions in a way that a single value results from them. Literal values, fields, and mathematical functions all result in one value, while linking functions can result in multiple values, depending on the number of issues that are involved. Operators or aggregating functions reduce multiple values into one. A formula must result in a single value, so subtasks('Quantity') is invalid, but sum(subtasks('Quantity')) is valid.

Literal Values

You can use constant values in your formulas. Their type is determined by their format.

...

Operator

Description

Example

+

Addition: Adds the two values.

12 + Quantity

-

Subtraction: Subtracts the second value from the first.

15 - Rating

*

Multiplication: Multiplies the two values.

Result * Factor

/

Division: Divides the first by the second value.

"Write off percentage" / 100

^

Potentiation: Raises the first value to the power of the second.

"Square length" ^ 2

%

Percentage: As on a calculator, you can add or subtract a percentage to/from a value.

Price - 10%

Grouping – Parentheses

Parentheses can be used to group operations to override operator precedence. 2 * 3 + 3 equals 9, but 2 * (3 + 3) equals 12.

Functions

Functions are versatile, we provide three types of them. One type consists of mathematical functions, to enable more calculations you can do. The second are aggregating functions, where you combine multiple values into one. The third type fetches values from other related issues.

Mathematical functions and aggregating functions can handle the multiple values returned by the linking functions subtasks, issuesInEpic, and linkedIssues, but only the aggregating functions reduce them to a single value. The mathematical functions apply themselves to each value in the list and return a list of equal size.

Mathematical Function

Description

Example

Can Take Multiple Values

Returns Multiple Values

round(number, decimals)

Rounds the passed value to the specified number of significant decimal digits.

round(15.386, 2)15.39 | round(15.5)16

(tick)

(tick)

floor(number)

Rounds the passed value to the nearest lower integer.

floor(16.34)16

(tick)

(tick)

ceiling(number)

Rounds the passed value to the nearest higher integer.

ceiling(16.34)17

(tick)

(tick)

abs(number)

Gives the absolute value, i. e. the positive value.

abs(-15)15 | abs(15)15

(tick)

(tick)

signum(number)

Normalises negative values to -1, zero to 0, and positive values to 1

signum(-255)-1 | signum(0)0 | signum(135)1

(tick)

(tick)

mod(dividend, divisor)

Calculates the remainder of the dividend when divided by the divisor.

mod(13, 2)1

(tick)

(tick)

Aggregating Function

Description

Example

Can Take Multiple Values

Returns Multiple Values

sum(number…)

Sums up the passed values.

sum(1, 4, 5)10 | sum(subtasks('quantity'))

(tick)

(error)

avg(number…)

Gives the average of the passed values.

avg(3, 5, 7)5

(tick)

(error)

min(number…)

Gives the smallest of the passed values.

min(-12, 0, 346)-12

(tick)

(error)

max(number…)

Gives the largest of the passed values.

max(-135, 0, 1)1

(tick)

(error)

Linking Function

Description

Example

Can Take Multiple Values

Returns Multiple Values

subtasks(field)

Retrieves the values of the passed field from all subtasks.

subtasks('Story Points')

(error)

(tick)

parent(field)

Retrieves the values of the passed field from the parent of a subtask.

parent('Quantity')

(error)

(error)

issuesInEpic(field)

Retrieves the values of the passed field from all issues in an epic.

issuesInEpic('Budget')

(error)

(tick)

epic(field)

Retrieves the values of the passed field from the epic of an issue.

epic('Price')

(error)

(error)

linkedIssues(linkName, field)

Retrieves the values of the passed field from all linked issues.

linkedIssues('causes', ‘Percentage’)

(error)

(tick)