Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

Supported list types

Table of Contents
exclude(Supported list types).*
stylecircle
typeflat
separatorpipe

Number list

UI Text Box
sizemedium
typeinfo

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

Code Block
languagebash
titleSyntax
linenumberstrue
sublist(numberList, startIndex, endIndex) #Output: Number list
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
sublist([1, 2, 3, 4, 5], 2, 4)

This example returns:

[2, 3, 4]

UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
numberList

Status
subtletrue
titlenumber list

Any given number list.
startIndex

Status
subtletrue
titlenumber

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

Status
subtletrue
titlenumber

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

This function returns a

Status
subtletrue
titlenumber list


Text list

UI Text Box
sizemedium
typeinfo
Variant for text lists.
Code Block
languagebash
titleSyntax
linenumberstrue
sublist(textList, startIndex, endIndex) #Output: Text list
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
sublist(["red", "green", "blue", "purple", "white"], 2, 4)

This example returns: 

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

Code Block
languagebash
linenumberstrue
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:

Code Block
languagebash
linenumberstrue
invertList(sublist(invertList(allComments()), 1, 5))

OR

Code Block
languagebash
linenumberstrue
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:

UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
textList

Status
subtletrue
titletext list

Any given text list.
startIndex

Status
subtletrue
titlenumber

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

Status
subtletrue
titlenumber

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

This function returns a

Status
subtletrue
titletext list


Issue list

UI Text Box
sizemedium
typeinfo

Variant for issue lists.

Code Block
languagebash
titleSyntax
sublist(issueList, startIndex, endIndex)  #Output: Issue list
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
sublist(subtasks(), 1, 3)

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


UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
issueList

Status
subtletrue
titleissue list

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

Status
subtletrue
titlenumber

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

Status
subtletrue
titlenumber

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

This function returns an

Status
subtletrue
titleissue list

Page properties
hiddentrue

Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged


Page properties
hiddentrue
Short description

Returns a defined extract of a given list.

Output

Status
subtletrue
titlelist

Available since

Status
subtletrue
colourBlue
title2.1.29

Label