sum()

This function returns the sum of all elements in a given number list.


Bash
sum(list) #Output: Number


Examples

Parser expression

Description

Bash
 sum([1, 2, 3, 4, 5])

This example returns:

15

Bash
 sum(fieldValue({issue.timeSpent}, subtasks()))


This example returns a number representing the total time spent in minutes in all sub-tasks of current issues.

To achieve this, the following functions are used:

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

list

number list

Any given number list.

Output

This function returns a number


📚 Use cases and examples