Validate a Select List (cascading) custom field

Use case

Validate the parent and child options of a Select List (cascading) field.

🛠️ Configuration

Add the Logical validator to the desired workflow transition.

Expression

Add the following expression to evaluate both options of a Select List (cascading) custom field.

Bash
%{issue.cfaaaaa} = "Parent option - Child option"

Please, replace the ID of the field code before testing the expression and note that the parent option must be separated from the child option with a hyphen "-" surrounded by two spaces.

Variations

By adding .0 or .1 to the field code of the custom field, the respective values of the parent option and child option can be accessed.

For accessing the parent option:

Bash
%{issue.cfaaaaa.0} = "Parent option"

For accessing the child option:

Bash
%{issue.cfaaaaa.1} = "Child option"
Use case Workflow function Parser functions
Prevent a transition depending of the number of components

Logical validator

Logical condition

numberOfSelectedItems()

Prevent a closed issue from being reopened after resting 1 week closed

Logical validator

Logical condition

isInRole()

Prevent the creation of sub-tasks unless the parent issue is in a certain status

Logical validator

Block an Epic's transition until all the issues under that Epic are resolved

Logical validator

Logical condition

count()

issuesUnderEpic()

filterByResolution()

Block an Epic's transition depending on linked issues status and due date

Logical validator

Logical condition

count()

filterByPredicate()

linkedIssues()

Evaluate Assets objects

Logical validator

Logical condition

findPattern() findReplaceAll() replaceAll() toStringList()

Prevent setting due dates outside business hours

Logical validator

Logical condition

withinCalendar()

Ensure that all issues linked with a certain issue link type have "Due Date" field set

Logical validator

Logical condition

count()

linkedIssues()

fieldValue()

Validation based on the value of a date type project property

Logical validator

Logical condition

stringToDate()

projectProperty()

Prevent issue creation if description contains less than 100 characters

Logical validator

replaceAll() length()

Restrict issue creation per issue type and project role

Logical validator

isInRole()

Validate a Select List (cascading) custom field

Logical validator Logical condition


Ensure that an issue has at least one attachment

Logical validator

Logical condition

Prevent issue creation with the same field value (Boolean)

Logical validator

Validation based on JQL query

count()

issuesFromJQL()

Validate only issue links created in transition screen

Logical validator

count()

transitionLinkedIssues()

filterByProject()

filterByIssueType()

Reject duplicated file names in attachments

Logical validator

Logical condition

count()

toStringList()

distinct()

Prevent external users from creating issues

Logical validator

matches() toString() textOnStringList() toStringList() userDisplayName()

Halt a transition if an element is not contained in a list

Logical validator Logical condition

toStringList()

Block a transition until all sub-tasks have certain fields populated

Logical validator

Logical condition

count()

filterByPredicate()

subtasks()

Make "Time spent" field required

Logical validator