🚀 JWT 3.0 is out 🚀 

The app was completely overhauled, and so was the documentation: Jira Workflow Toolbox (Server/Data Center) Home

The page you are viewing is still valid for all app versions prior to 3.0.

On this page

Example: Require at least one subtask of type "QA Sub-task" in status "Resolved" or "Closed" whenever option "Testing required" is selected in Check-Box custom field

Let us suppose we have a Check Box type custom field called Issue Options, and that one of its options is "Testing required". We want to add a validator that will force the existence of at least one subtask of type "QA Subtask" in status "Resolved" of "Closed" whenever option "Testing required" is checked. To implement that example we have to use validator Boolean validator with math, date-time or text-string terms with the following configuration:

The expression used: !matches(%{13500}, ".*Testing required.*") OR count(filterByStatus(filterByIssueType(subtasks(), "QA Subtask"), "Resolved, Closed")) > 0

Note that:

  • code of field "Issue Options" is %{13500}

Function matches must be used to evaluate the value of Issue Options since that field may have more than one option selected, and the returned value is a comma separated list with selected options. We use regular expression ".*Testing required.*", since that regular expression matches any combination where the option "Testing required" is selected.

Other examples of that function

Related Usage Examples