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

Use case

Some fields return a text with several elements in the form of a list. In this use case we will convert this text into a text list and compare it with as many elements as needed.

🛠️ Configuration

Add the Logical validator to the desired workflow transition.

Expression

Add an expression following the next format:

Bash
toStringList(%{issue.components}) ~ ["Component 01", "Component 02"]

You can replace both the field code of the Components fields and the options between quotation marks and brackets with any custom field that returns a text and any text respectively.

Error message

Optionally, enter an error message as the following one.

Bash
Only issues with Component 01 and Component 02 can be transitioned.
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