Number list
This function filters a number list by a given logical expression where ^ is used for referencing the current list value.
It basically iterates over each list element, checks whether the logical expression returns true, and if it does, includes the element in the output.
Bash
filterByPredicate(numberList, logicalExpression) #Output: Number list
Text list
Variant for text lists. The current list value is referenced by ^%.
Bash
filterByPredicate(textList, logicalExpression) #Output: Text list
Issue list
Variant for issue lists.
Bash
filterByPredicate(issueList, logicalExpression) #Output: Issue list
This is one of the most powerful functions in JWT since it combines filtering with boolean or logical expressions.
To freshen up your knowledge or to get some inspiration head over to:
📚 Use cases and examples
| Use case | JWT feature | Workflow function | Field type | Automated action | Parser functions |
|---|---|---|---|---|---|
| Number of open subtasks |
|
Number | |||
| Add watchers ignoring inactive users |
|
usersInGroup() isActive() toString() filterByPredicate() | |||
| Match several values of a list |
|
toString() distinct() filterByPredicate() | |||
| Block a transition until all sub-tasks have certain fields populated |
|
||||
| Block an Epic's transition depending on linked issues status and due date |
|