Custom Script Condition
Use the Custom script condition to run an embedded script that determines whether an issue should be permitted to transition to a particular status within a workflow. This condition allows you to write Groovy scripts that can evaluate a wide range of conditions based on issue fields, workflow states, project properties, user permissions, and other contextual data.
If you need help writing your script, check out the Scripting tips page.
Use this condition
Condition functions
Condition functions determine if a transition should be visible for a particular issue. Jira runs condition functions frequently, it's therefore important to avoid doing any long processing in them.
To control whether a transition is permitted, you must set a variable named passesCondition to true or false. By default, passesCondition is true, meaning the action will be allowed unless you explicitly set it otherwise.