Supported list types

Number list

This function returns the last element of a number list.

Syntax
last(numberList) #Output: Number
Examples
Parser expressionDescription
%{last([3, 2, 1, 0])} 

This example returns:

0

Additional information

Parameters used in this function

ParameterInput (data type)Description
numberList

NUMBER LIST

Any given number list.
Output

This function returns a NUMBER

If the number list is empty, the function returns NULL


Text list

This function returns the last element of a text list.

Syntax
last(textList) #Output: Text
Examples
Parser expressionDescription
%{last(["blue", "red", "green"])}

This example returns:

green

Additional information

Parameters used in this function

ParameterInput (data type)Description
textList

TEXT LIST

Any given text list.
Output

This function returns a TEXT

If the text list is empty, the function returns NULL


Issue list

This function returns an issue list with the last element of the given issue list.

Syntax
last(issueList) #Output: Issue list
Examples
Parser expressionDescription
%{last(subtasks())}

This example returns the last sub-task of the current issue, e.g.:

IT-9289

To achieve this, the following functions are used:

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()).
Output

This function returns an ISSUE LIST

If the issue list is empty, the function returns an empty ISSUE LIST


Use cases and examples