Versions Compared

Key

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


Panel

Supported list types

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


Image AddedNumber list

UI Text Box
sizemedium
typeinfo

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


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


UI Expand
titleExamples


Parser expressionDescription


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


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
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

Parameters used in this function

Short descriptionReturns a
ParameterInput (data type)Description
numberList

Status
subtletrue
titlenumber list

Any given number list
with elements in l sorted in a specified order.Output
.
order

Status
subtletrue
titletext

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



UI Expand
titleOutput

The function returns a

Status
subtletrue
titlenumber list



Image AddedText list

UI Text Box
sizemedium
typeinfo

Variant for text lists.


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


UI Expand
titleExamples


Parser expressionDescription


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


This example returns:

["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
textList

Status
subtletrue
titletext list

Any given text list.
order

Status
subtletrue
titletext

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



UI Expand
titleOutput

The function returns a

Status
subtletrue
titlenumber list
with elements in l sorted in a specified order.
text list



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


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


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
sort([2, 4, 3, 1](linkedIssues("is blocked by"), {issue.dueDate}, ASC) 
The function returns the
Status
subtletrue
titlenumber list
: [1, 2, 3, 4]


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:


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

<parameter>

ParameterInput (data type)Description
issueList

Status
subtletrue
titleissue list

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

Status
subtletrue
title

data type

text

Any field code representing a number, text or selectable field.
orderParameter description.<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
title

number list

list

Available since

Status
subtletrue
colourBlue
title2.1.27

Label