Status
Tech review

Style guide




Short description

Returns the first element of a number, text, or issue list.

Output

  

Available since




Supported list types


Number list

This function returns the first element of a number list.


first(list) #Output: Number



Parser expressionDescription


first([3, 2, 1, 0])


This example returns the number 3.



Parameters used in this function

ParameterInput (data type)Description
list

Any given number list.



This function returns a .

If the number list is empty, the function returns .



Text list

This function returns the first element of a text list.


first(list) #Output: Text



Parser expressionDescription


first(["blue", "red", "green"])


This example returns "blue".



Parameters used in this function

ParameterInput (data type)Description
list

Any given text list.



This function returns a .

If the text list is empty, the function returns .



Issue list

The function returns an issue list with the first element of the given issue list.


first(list) #Output: Issue list



Parser expressionDescription


first(subtasks())


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

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




Parameters used in this function

ParameterInput (data type)Description
list

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



This function returns an .

If the issue list is empty, the function returns an empty .