Supported list types

Number list

This function returns the index / position of a specified element in a number list.

Syntax
indexOf(number, numberList) #Output: Number
Examples
Parser expressionDescription
indexOf(1, [5, 2, 1, 4, 1])

This example returns

3

indexOf(3, [5, 2, 1, 4, 1])
This example returns the 0, since 3 is not in the provided list.
Additional information

Parameters used in this function

ParameterInput (data type)Description
number

NUMBER

Any given number.
numberList

NUMBER LIST

Any given number list.
Output

This function returns a NUMBER .

If the number is not part of the number list, the function returns 0.


Text list

Variant for text lists.

Syntax
indexOf(text, textList) #Output: Number
Examples
Parser expressionDescription
indexOf("blue", ["red", "blue", "green"])

This example returns

2

indexOf("orange", ["red", "blue", "green"])
This example returns the 0, since "orange" is not part of the list.
Additional information

Parameters used in this function

ParameterInput (data type)Description
text

TEXT

Any given text.
textList

TEXT LIST

Any given text list.
Output

The function returns a NUMBER .

If the text is not part of the text list, the function returns 0.


Issue list

Variant for issue lists.

Syntax
indexOf(issueKey, issueList) #Output: Number
Examples
Parser expressionDescription
indexOf(%{issue.key}, issuesUnderEpic())

This example returns the index of the current issue in relationship to all issues under the current epic.

To achieve this, the following functions are used:

Additional information

Parameters used in this function

ParameterInput (data type)Description
issueKey

TEXT

Any given issue key.
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 .

If the issue key is not in the issue list, the function returns 0.


Variant where you define an issue list instead of an issue key.

Syntax
indexOf(issueList1, issueList2) #Output: Number
Examples
Parser expressionDescription
indexOf(linkedIssues(), subtasks())

This example returns the index of the first linked issue which is also a subtask.

To achieve this, the following functions are used:

Additional information

Parameters used in this function

ParameterInput (data type)Description
issueList1

ISSUE LIST

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

The index will always be retrieved from the first element of the list. If the list returns [ISSUE1, ISSUE2], the index of ISSUE1 will be retrieved.

issueList2

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 .

If the first issue list is empty or the second list does not contain the issue, the function returns 0.


Use cases and examples