You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »


Supported list types

Number list

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

Syntax
filterByPredicate(numberList, booleanExpression) #Output: Number list
Examples
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]

Additional information

Parameters used in this function

ParameterInput (data type)Description
numberList

NUMBER LIST

Any given number list.
booleanExpression

BOOLEAN

A boolean expression that returns true or false.

^ is used for referencing the current value.

Output

This function returns a NUMBER LIST


Text list

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

Syntax
filterByPredicate(textList, booleanExpression) #Output: Text list
Examples
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.

Additional information

Parameters used in this function

ParameterInput (data type)Description
textList

TEXT LIST

Any given text list.
booleanExpression

BOOLEAN

A boolean expression that returns true or false.

^% is used for referencing the current value.

Output

This function returns a TEXT LIST


Issue list

Variant for issue lists.

This function returns an issue list  with issues in l whose cardinality (i.e., the number of times it appears in list l) satisfies the comparison cardinality operator n.

Available comparison operators: =, !=, <, <=, > and >=.

Syntax
filterByPredicate(issueList, booleanExpression) #Output: Issue list
Examples
Parser expressionDescription
filterByCardinality(linkedIssues(), >, 1) 

This example returns an issue list with all issues linked to current issue with 2 or more issue links.

Additional information

Parameters used in this function

ParameterInput (data type)Description
issueList

DATA TYPE

Parameter description.
booleanExpression

DATA TYPE

Parameter description.
Output

This function returns an ISSUE LIST