Number list
This function returns a sublist of a given number list by using a start index (first element) and end index (last element).
sublist(numberList, startIndex, endIndex) #Output: Number list
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns: [2, 3, 4]
|
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
number list |
Any given number list. |
|
|
number |
A valid index must be >= 1 and <= count(numberList) which is the maximum number of elements in the list. |
|
|
number |
A valid index must be >= 1 (and >= startIndex) and <= count(numberList) which is the maximum number of elements in the list. |
Output
This function returns a number list
Text list
Variant for text lists.
sublist(textList, startIndex, endIndex) #Output: Text list
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns: ["green", "blue", "purple"]
|
|
Bash
|
This example returns a text list with the last 5 comments of the current issue. To achieve this, the following functions are used: |
|
Bash
OR Bash
|
This example returns a text list with the last 5 comments of the current issue in ascending order. To achieve this, the following functions are used: |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
text list |
Any given text list. |
|
|
number |
A valid index must be >= 1 and <= count(textList) which is the maximum number of elements in the list. |
|
|
number |
A valid index must be >= 1 (and >= startIndex) and <= count(textList) which is the maximum number of elements in the list. |
Output
This function returns a text list
Issue list
Variant for issue lists.
sublist(issueList, startIndex, endIndex) #Output: Issue list
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns an issue list with the first 3 sub-tasks.
|
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()). |
|
|
number |
A valid index must be >= 1 and <= count(issueList) which is the maximum number of elements in the list. |
|
|
number |
A valid index must be >= 1 (and >= startIndex) and <= count(issueList) which is the maximum number of elements in the list. |
Output
This function returns an issue list
📚 Use cases and examples
| Use case |
|---|
| No content found. |