Versions Compared

Key

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


Page properties
hiddentrue



Status
Tech review

Status
colourYellow
titletodoReady for review

Style guide

Status
colourYellow
titletodoReady for review

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



Page properties
hiddentrue


Short description

Returns the first element in the of a number, text, or issue list l, or  null if l is an empty list.

Output

Status
subtletrue
titlenumber
 
Status
subtletrue
titletext
 
Status
subtletrue
titleissue list

Available since

Status
subtletrue
colourBlue
title2.1.26




Panel

Supported list types

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


Number list

UI Text Box
sizemedium
typeinfo

This function returns the first element in the of a number list l, or  null if l is an empty list.


Code Block
languagebash
titleSyntax
linenumberstrue
first(number list l) #Output: Number


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
first([3, 2, 1, 0])


This example returns the number 3, which is the first element of the number list l.



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxlist

Status
subtletrue
titledata typenumber list

Any given number listParameter description.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titlenumber
.

If the number list is empty, the function returns 

Status
subtletrue
titlenull
.



Text list

UI Text Box
sizemedium
typeinfo

This function returns the first element in the text list l, or null if l is an empty of a text list.


Code Block
languagebash
titleSyntax
linenumberstrue
first(string list l) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
first(["blue", "red", "green"])


This example returns the text: "blue", which is the first element of the text list l.



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxlist

Status
subtletrue
titledata typetext list

Any given text listParameter description.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext
.

If the text list is empty, the function returns 

Status
subtletrue
titlenull
.



Issue list

UI Text Box
sizemedium
typeinfo

The function returns an issue list with the first element in issue list l, or an empty list if l is an empty listof the given issue list.


Code Block
languagebash
titleSyntax
first(issue list l) #Output: Issue list


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
first(subtasks())


This example returns a list with the last subtask returned by subtasks() in it.

Info

If subtasks() would return [SUB-1, SUB-2, SUB-3], the output would be [SUB-1].




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxlist

Status
subtletrue
titledata typeissue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedissues() or subtasks())Parameter description.



UI Expand
titleOutput

This function returns an

Status
subtletrue
titleissue list
.

If the issue list is empty, the function returns 

Status
subtletrue
titlenull
.