intersect()

Number list

This function returns a number list with all numbers present in two lists simultaneously.

The returned list does not contain duplicates. The order is respected.

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

Examples

Parser expression

Description

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

This example returns

1, 3

Bash
%{intersect(toNumberList(%{issue.versions.id}),toNumberList(%{issue.fixVersions.id}))}
  • This example returns a number list of version id/s that appear both in affected and fix version/s id/s of the current issue, e.g. 

    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 type of number list. Learn more about working with lists.

numberList2

number list

Any type number list. Learn more about working with lists.

Output

This function returns a number list


Text list

Variant for text lists.

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

Examples

Parser expression

Description

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

This example returns

blue


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

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

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 type of text list. Learn more about working with lists.

textList2

text list

Any type of text list. Learn more about working with lists.

Output

This function returns a text list


Issue list

Variant for issue lists.

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

Examples

Parser expression

Description

Bash
%{intersect(linkedIssues(), subtasks())}

This example returns a list with all sub-tasks which are also linked to the current issue.

To achieve this, the following functions are used:

Additional iformation

Parameters used in this function

Parameter

Input (data type)

Description

issueList1

issue list

Any type of issue list. Learn more about working with lists.

issueList2

issue list

Any type of issue list. Learn more about working with lists.

Output

This function returns an issue list


(books) Use cases and examples