Supported list types

Number list

This function returns a sublist of a given number list by using a start index (first element) and end index (last element).

Syntax
sublist(numberList, startIndex, endIndex) #Output: Number list
Examples
Parser expressionDescription
sublist([1, 2, 3, 4, 5], 2, 4)

This example returns:

[2, 3, 4]

Additional information

Parameters used in this function

ParameterInput (data type)Description
numberList

NUMBER LIST

Any given number list.
startIndex

NUMBER

A valid index must be >= 1 and <= count(numberList) which is the maximum number of elements in the list.
endIndex

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.
Syntax
sublist(textList, startIndex, endIndex) #Output: Text list
Examples
Parser expressionDescription
sublist(["red", "green", "blue", "purple", "white"], 2, 4)

This example returns: 

["green", "blue", "purple"]

sublist(invertList(allComments()), 1, 5)

This example returns a text list with the last 5 comments of the current issue.

To achieve this, the following functions are used:

invertList(sublist(invertList(allComments()), 1, 5))

OR

sublist(allComments(), count(allComments()) - 4, count(allComments()))

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

ParameterInput (data type)Description
textList

TEXT LIST

Any given text list.
startIndex

NUMBER

A valid index must be >= 1 and <= count(textList) which is the maximum number of elements in the list.
endIndex

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.

Syntax
sublist(issueList, startIndex, endIndex)  #Output: Issue list
Examples
Parser expressionDescription
sublist(subtasks(), 1, 3)

This example returns an issue list with the first 3 sub-tasks.


Additional information

Parameters used in this function

ParameterInput (data type)Description
issueList

ISSUE LIST

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

NUMBER

A valid index must be >= 1 and <= count(issueList) which is the maximum number of elements in the list.
endIndex

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