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.
filterByPredicate(numberList, logicalExpression) #Output: Number list
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns a number list with values greater than 2: [3, 4] |
|
Bash
|
This example returns a number list with even values: [2, 4] To achieve this, the following functions are used: For additional mathematical functions, see Numbers. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
number list |
Any given number list. |
|
|
text |
A logical expression that returns
|
Output
This function returns a number list
Text list
Variant for text lists. The current list value is referenced by ^%.
filterByPredicate(textList, logicalExpression) #Output: Text list
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns a text list with words that have more than 4 characters: ["sword"] |
|
Bash
|
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
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
text list |
Any given text list. |
|
|
text |
A logical expression that returns true or false.
|
Output
This function returns a text list
Issue list
Variant for issue lists.
filterByPredicate(issueList, logicalExpression) #Output: Issue list
Examples
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns an issue list with linked issues (see linkedIssues()) that have the same summary like the current issue. |
|
Bash
|
This example returns an issue list with all unassigned issues under the current epic (see issuesUnderEpic()). |
|
Bash
|
This example returns an issue list with unresolved blocked issues with a higher priority than the current issue. |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
issue list |
Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()). |
|
|
text |
A logical expression that returns true or false.
|
Output
This function returns an 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 | Workflow function | Field type | Parser functions |
|---|---|---|---|
| Block an Epic's transition depending on linked issues status and due date | |||
| Match several values of a list | |||
| Add watchers ignoring inactive users | |||
| Number of open subtasks | |||
| Block a transition until all sub-tasks have certain fields populated |