append()

Number list

This function combines two number lists.

The order of elements is respected and the result may contain duplicates.

If you want to avoid duplicates, use the function union().

Bash
append(numberList1, numberList2) #Output: Number list

Examples

Parser expression

Description

Bash
%{append([1, 2, 3], [3, 4, 5])}

This example returns

1, 2, 3, 3, 4, 5

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

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

10002,10000,10001,10002 

To achieve this, the following functions are used:

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

numberList1

number list

Any given number list.

numberList2

number list

Any given number list.

Output

This function returns a number list .

If both lists are empty, the function returns an empty  number list .


Text list

Variant for text lists.

Bash
append(textList1, textList2) #Output: Text list

Examples

Parser expression

Description

Bash
%{append(["blue", "red", "green"], ["red", "green", "yellow"])}

This example returns

blue, red, green, red, green, yellow

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

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

1.1,1.0,2.0,1.1 

To achieve this, the following functions are used:

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

textList1

text list

Any given text list.

textList2

text list

Any given text list.

Output

This function returns a text list .

If both lists are empty, the function returns an empty  text list .


Issue list

Variant for issue lists.

Bash
append(issueList1, issueList2) #Output: Issue list

Examples

Parser expression

Description

Bash
%{append(linkedIssues("is blocked by"), subtasks())}

This example returns an issue list of blocking issues and sub-tasks.

If a sub-task is also linked with issue link type "is blocked by", it will appear twice in the output list.

To achieve this, the following functions are used:

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

issueList1

issue list

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

issueList2

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 both lists are empty, the function returns an empty  issue list .


(books) Use cases and examples