Number list
This function returns the index / position of a specified element in a number list.
indexOf(number, numberList) #Output: Number
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns 3 |
|
Bash
|
This example returns the 0, since 3 is not in the provided list. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
number |
Any given number. |
|
|
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.
indexOf(text, textList) #Output: Number
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns 2 |
|
Bash
|
This example returns the 0, since "orange" is not part of the list. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
text |
Any given text. |
|
|
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 key issue list
Variant for issue lists.
indexOf(issueKey, issueList) #Output: Number
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
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
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
issueKey |
text |
Any given issue key. |
|
|
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.
Issue lists
Variant where you define an issue list instead of an issue key.
indexOf(issueList1, issueList2) #Output: Number
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
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
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
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 |
|
|
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
| Use case | Workflow function | Field type | Parser functions |
|---|---|---|---|
| Prioritize the issues globally |