Supported list types

Number list

This function removes all duplicates from a number list.

Syntax
distinct(numberList) #Output: Number list
Examples
Parser expressionDescription
%{distinct([1, 2, 1, 3, 4, 4, 5])}

This example returns

1, 2, 3, 4, 5

%{distinct(append(toNumberList(%{issue.versions.id}),toNumberList(%{issue.fixVersions.id})))}

This example returns a distinct number list of both affected and fix version/s id/s of the current issue, e.g.

10002,10000,10001

To achieve this, the following functions are used:

Additional information

Parameters used in this function

ParameterInput (data type)Description
numberList

NUMBER LIST

Any given number list.
Output

This function returns a NUMBER LIST.

If the list is empty, the function returns an empty NUMBER LIST.


Text list

This function removes all duplicates from a text list.

Syntax
distinct(textList) #Output: Text list
Examples
Parser expressionDescription
%{distinct(["blue", "green", "yellow", "blue", "yellow"])}

This example returns

blue, green, yellow

%{distinct(append(toStringList(%{issue.versions}),toStringList(%{issue.fixVersions})))}

This example returns a distinctext list of both affected and fix version/s of the current issue, e.g.

1.1,1.0,2.0

To achieve this, the following functions are used:

Additional information

Parameters used in this function

ParameterInput (data type)Description
textList

TEXT LIST

Any given text list.
Output

The function returns a TEXT LIST.

If the list is empty, the function returns an empty TEXT LIST.


Issue list

This function removes all duplicates from an issue list.

Syntax
distinct(issueList) #Output: Issue list
Examples
Parser expressionDescription
%{distinct(linkedIssues())}

This example returns an issue list of linked issues, with only one occurrence per issue, although an issue may be linked with more than one issue link type.

To achieve this, the following functions are used:

Additional information

Parameters used in this function

ParameterInput (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 an ISSUE LIST.

If the list is empty, the function returns an empty ISSUE LIST.