count()

Number list

This function returns the number of elements in a number list.

Bash
count(numberList) #Output: Number

Examples

Parser expression

Description

Bash
%{count([1, 1, 2, 2])}

This example returns:

4

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

numberList

number list

Any given number list.

Output

This function returns a number


Text list

This function returns the number of elements in a text list.

Bash
count(textList) #Output: Number

Examples

Parser expression

Description

Bash
%{count(["blue", "red", "blue", "black"])}

This example returns:

4

Bash
%{count(toStringList(%{issue.components}))}

This example returns the number of components of an issue, e.g:

2

To achieve this, the following function is used:

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

textList

text list

Any given text list.

Output

This function returns a number


Issue list

This functions returns the number of elements in a given issue list.

Bash
count(issueList) #Output: Number

Examples

Parser expression

Description

Bash
%{count(subtasks())}

This example returns the number of all subtasks of the current issue, e.g:

3

To achieve this, the following function is used:

Bash
%{count(linkedIssues("is blocked by"))}

This example returns the number of all linked blocking issues, e.g:

2

To achieve this, the following function is used:

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

issueList

issue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).

Output

This function returns a number


(books) Use cases and examples