Supported list types


Number list

This function sorts a given number list in a specified order. Available orders are ASC (for ascending order) and DESC (for descending order).


sort(numberList, order) #Output: Number list



Parser expressionDescription


sort([2, 4, 3, 1], ASC) 


This example returns:

[1, 2, 3, 4]


sort(fieldValue({issue.cf10110}, linkedIssues()), DESC)


This example returns a number list with e.g. the Story Points of all linked issues in descending order.

To achieve this, the following functions are used:

Note that {issue.cf10110} is the field code for Story Points. It might differ on your instance.





Parameters used in this function

ParameterInput (data type)Description
numberList

Any given number list.
order

Available orders are ASC (for ascending order) and DESC (for descending order).



The function returns a



Text list

Variant for text lists.


sort(textList, order) #Output: Text list



Parser expressionDescription


sort(["red", "blue", "green"], ASC)


This example returns:

["blue", "green", "red"]


sort(fieldValue(%{issue.assignee}, subtasks()), ASC)


This example returns a text list with all sub-tasks's assignees in ascending order.

To achieve this, the following functions are used:



Parameters used in this function

ParameterInput (data type)Description
textList

Any given text list.
order

Available orders are ASC (for ascending order) and DESC (for descending order).



The function returns a



Issue list

Variant for issue lists.

In this case, a field has to be provided that should be used for the sort order. Available orders are ASC (for ascending order) and DESC (for descending order).


sort(issueList, field, order) #Output: Issue list



Parser expressionDescription


sort(linkedIssues("is blocked by"), {issue.dueDate}, ASC)


This example returns an issue list of issues blocking current issue, sorted in ascending order by Due date.

To achieve this, the following functions are used:


sort(subtasks(), %{issue.assignee}, ASC)


This example returns an issue list of sub-tasks, sorted in ascending order by their assignee.

To achieve this, the following functions are used:



Parameters used in this function

ParameterInput (data type)Description
issueList

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

Any field code representing a number, text or selectable field.
order

Available orders are ASC (for ascending order) and DESC (for descending order).



The function returns an



Use cases and examples



Parser function cloudsort()
Map(tick)
Notes






Status
Tech review

Style guide




Short description

Sorts a given list in a specific order.

Output

Available since

Label