union()

Number list

This function returns a number list with distinct elements from two lists.

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

Examples

Parser expression

Description

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

This example returns

[1, 2, 3, 4, 5]

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

Text list

Variant for text lists.

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

Examples

Parser expression

Description

Bash
union(["blue", "red", "green"], ["red", "green", "yellow"])

This example returns

["blue", "red", "green", "yellow"]

Bash
 union(fieldValue(%{00074}, subtasks()), fieldValue(%{00074}, linkedIssues())) 

This example returns a text list with distinct Fix Version/s of all sub-tasks and blocking issues.

To achieve this the following functions are used:

Additional info

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

Issue list

Variant for issue lists.

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

Examples

Parser expression

Description

Bash
union(linkedIssues(), subtasks()) 

This example returns the issue list of linked issues and sub-tasks of current issue, without duplicates.

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

This function is the equivalent to the list operator UNION and can be used interchangeably. 

📚 Use cases and examples

Use case Workflow function Field type Automated action Parser functions