Date: Thu, 28 Mar 2024 10:14:02 +0100 (CET) Message-ID: <1589038275.298.1711617242548@apps-confluence-5.apps-confluence.apps.svc.cluster.local> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_297_496536252.1711617242547" ------=_Part_297_496536252.1711617242547 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Let us suppose we have a Check Box type custom field called&nb= sp;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 op= tion "Testing required" is checked. To implement that exam= ple we have to use validator Boolean v= alidator with math, date-time or text-string terms with t= he following configuration:
The expression used: !matches(%{13500}, ".*Testing require=
d.*") OR count(filterByStatus(filterByIssueType(subtasks(), "QA Subtask"), =
"Resolved, Closed")) > 0
Note that:
Function matches must be used to evaluate the= value of Issue Options since that field may hav= e more than one option selected, and the returned value is a comma separate= d list with selected options. We use regular expression ".*Tes= ting required.*", since that regular expression matches any combin= ation where the option "Testing required" is selected.