Status
Tech review

Style guide




Short description

Filters a numberissue, or a text list by a given boolean expression.

Output

Available since




Supported list types


Number list

This function filters a number list by a given boolean expression where ^ is used for referencing the current list value.


filterByPredicate(numberList, booleanExpression) #Output: Number list



Parser expressionDescription


filterByPredicate([1, 2, 3, 4], ^ > 2)


This example returns a number list with values greater than 2 : [3, 4]


filterByPredicate([1, 2, 3, 4], modulus(^, 2) = 0) 


This example returns a number list with even values : [2, 4]



Parameters used in this function

ParameterInput (data type)Description
numberList

Any given number list.
booleanExpression

A boolean expression that returns true or false.

^ is used for referencing the current list value.



This function returns a



Text list

Variant for text lists. The current list value is referenced by ^%.


filterByPredicate(textList, booleanExpression) #Output: Text list



Parser expressionDescription


filterByPredicate(["book", "rose", "sword"], length(^%) > 4)


This example returns a text list with words that have more than 4 characters: ["sword"]


filterByPredicate(["book", "rose", "sword"], ^% in %{00000} OR ^% in %{00001})


This example returns a text list with those words that also appear in the issue's Summary or Description.



Parameters used in this function

ParameterInput (data type)Description
textList

Any given text list.
booleanExpression

A boolean expression that returns true or false.

^% is used for referencing the current list value.



This function returns a



Issue list

Variant for issue lists.


filterByPredicate(issueList, booleanExpression) #Output: Issue list



Parser expressionDescription


filterByPredicate(linkedIssues(), ^%{issue.summary} ~ %{issue.summary}) 


This example returns an issue list with linked issues that have the same summary like the current issue.

To achieve this, the following functions are used:


filterByPredicate(issuesUnderEpic(), ^%{issue.assignee} = null) 


This example returns an issue list with all unassigned issues under the current epic.

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

A boolean expression that returns true or false.

^ in front of field codes is used to reference the list's current issue.



This function returns an