Versions Compared

Key

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


Page properties
hiddentrue
Status
Tech review

Status
titletodo

Style guide

Status
titletodo

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

Page properties
hiddentrue
Short descriptionReturns a Statussubtletruetitlelist with elements in l from indexFrom index to indexTo index.Output Statussubtletruetitlelist Panel

Supported list types

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


Number list

with elements in l from indexFrom index to indexTo index.Having indexFrom >= 1 and indexFrom <= count(l) and indexTo >= 1 and indexTo <= count(l) and indexFrom <= indexToa sublist of a given number list by using a start index (first element) and end index (last element).

UI Text Box
sizemedium
typeinfo

The This function returns a

Status
subtletrue
titlenumber list


Code Block
languagebash
titleSyntax
linenumberstrue
sublist(number list lnumberList, number indexFromstartIndex, number indexToendIndex) #Output: Number list


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
sublist([1, 2, 3, 4, 5], 2, 4)


This example returns:

The function returns the

Status
subtletrue
titlenumber list
: [2, 3, 4]



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
<parameter>numberList

Status
subtletrue
titledata typenumber list

Any given number listParameter description.
<parameter>startIndex

Status
subtletrue
title

data typeParameter description.

number

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

Status
subtletrue
title

data type
number

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



UI Expand
titleOutput

The This function returns a

Status
subtletrue
titlenumber list



Text list

UI Text Box
sizemedium
typeinfo
Returns a 
Status
subtletrue
titletext list
with elements in l from indexFrom index to indexTo index. Having indexFrom >= 1 and indexFrom <= count(l) and indexTo >= 1 and indexTo <= count(l) and indexFrom <= indexToVariant for text lists.


Code Block
languagebash
titleSyntax
linenumberstrue
sublist(text list ltextList, number indexFromstartIndex, number indexToendIndex) #Output: Text list


UI Expand
titleExamples


This example returns

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

Parser expressionDescription


Code Block
languagebash
linenumberstrue
sublist(["red", "green", "blue", "purple", "white"], 2, 4)


The function returns the

Status
subtletrue
titletext list


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
<parameter>textList

Status
subtletrue
titledata typetext list

Any given text listParameter description.
<parameter>startIndex

Status
subtletrue
title

data typeParameter description.

number

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

Status
subtletrue
title

data type
number

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



UI Expand
titleOutput

The This function returns a

Status
subtletrue
titletext list



Issue list

UI Text Box
sizemedium
typeinfo

The function returns an 

Status
subtletrue
titleissue list
with elements in l from indexFrom index to indexTo index.

Having indexFrom >= 1 and indexFrom <= count(l) and indexTo >= 1 and indexTo <= count(l) and indexFrom <= indexTo.

Variant for issue lists.


Code Block
languagebash
titleSyntax
sublist(issue list lissueList, number indexFromstartIndex, number indexToendIndex)  #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
<parameter>
issueList

Status
subtletrue
title

data type

issue list

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

Status
subtletrue
title

data typeParameter description.<parameter>

number

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

Status
subtletrue
title

data typeParameter description

number

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



UI Expand
titleOutput

The This function returns an

Status
subtletrue
titleissue list



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_sublist" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloudsublist()
Map(tick)
Notes




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