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 a list with elements in l sorted in Sorts a given list in a specified order.

Output

Status
subtletrue
titlelist

Available since

Status
subtletrue
colourBlue
title2.1.27




Panel

Supported list types

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


Number list

UI Text Box
sizemedium
typeinfo

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


Code Block
languagebash
titleSyntax
linenumberstrue
sort(number list lnumberList, order) #Output: Number list


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
sort([2, 4, 3, 1], ASC) 


This example returns the following number list :

[1, 2, 3, 4]


Code Block
languagebash
linenumberstrue
sort(fieldValue({issue.cf10110}, linkedIssues()), DESC)


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

To achieve this, the following functions are used:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxnumberList

Status
subtletrue
titledata typenumber list

Any given number listParameter description.
xxxorder

Status
subtletrue
titledata typetext

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



UI Expand
titleOutput

The function returns a

Status
subtletrue
titlenumber list



Text list

UI Text Box
sizemedium
typeinfo

This function returns a text list with elements in l lexicographical order. Available orders are ASC (for ascending order) and DESC (for descending order)Variant for text lists.


Code Block
languagebash
titleSyntax
linenumberstrue
sort(string list ltextList, order) #Output: Text list


UI Expand
titleExamples


Parser expressionDescription


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


This example returns the following text list :

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


Code Block
languagebash
linenumberstrue
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:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxtextList

Status
subtletrue
titledata typetext list

Any given text listParameter description.
xxxorder

Status
subtletrue
titledata typetext

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



UI Expand
titleOutput

The function returns a

Status
subtletrue
titletext list



Issue list

UI Text Box
sizemedium
typeinfo

This function returns an issue list with elements in l ordered according to values of field.

Argument field has the format {nnnnn} for numeric and date-time fields, %{nnnnn} for text fields, or %{nnnnn.i} for cascading select fields. 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).


Code Block
languagebash
titleSyntax
linenumberstrue
sort(issue list lissueList, field field, order) #Output: Issue list


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
sort(linkedIssues("is blocked by"), {00012issue.dueDate}, ASC)


This example returns the an issue list of issues blocking current issue, sorted in ascending order by Due date.{00012} is code for numeric value of Due date.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
sort(subtasks(), %{issue.assignee}, ASC)


This example returns an issue list of sub-tasks ordered by their assignee.

To achieve this, the following functions are used:



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxissueList

Status
subtletrue
titledata typeissue list

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

Status
subtletrue
titledata type

Parameter description.

text

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

Status
subtletrue
titledata typetext

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



UI Expand
titleOutput

The function returns an

Status
subtletrue
titleissue list