Versions Compared

Key

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


Page properties
hiddentrue
Status
Tech review

Status
titletodo

Style guide

Status
titletodo

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

Page properties
hiddentrue
Short descriptionReturns a Statussubtletruetitlelist with elements in l sorted in a specified order.Output Statussubtletruetitlelist Panel

Supported list types

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


Number list

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

UI Text Box
sizemedium
typeinfo

The This function returns a

Status
subtletrue
titlenumber list


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) 
The function returns the
Status
subtletrue
titlenumber list
: [1, 2, 3, 4]


This example returns:

[1, 2, 3, 4]


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

UI Text Box
typenote

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





UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
<parameter>numberList

Status
subtletrue
titledata typenumber list

Any given number listParameter description.
<parameter>order

Status
subtletrue
title

data type
text

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

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 function returns the

Status
subtletrue
titlenumber 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
<parameter>textList

Status
subtletrue
titledata typetext list

Any given text listParameter description.
<parameter>order

Status
subtletrue
title

data type
text

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

Variant for issue lists.

In this case, a field has to be provided that should be used for the sort order. 

The function returns an 

Status
subtletrue
titleIssue 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. Available orders are ASC (for ascending order) and DESC (for descending order).


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


UI Expand
titleExamples


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

To achieve this, the following functions are used:

{00012} is code for numeric value of Due date.
Parser expressionDescription


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


The function returns the

Status
subtletrue
title


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



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
<parameter>issueList

Status
subtletrue
titledata typeissue list

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

Status
subtletrue
title

data typeParameter description.

text

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

Status
subtletrue
title

data type
text

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



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_sort" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloudsort()
Map(tick)
Notes




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

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



Page properties
hiddentrue


Short description

Sorts a given list in a specific order.

Output

Status
subtletrue
titlelist

Available since

Status
subtletrue
colourBlue
title2.1.27

Label